- Learning C for Arduino
- Syed Omar Faruk Towaha
- 184字
- 2021-07-09 19:10:07
Exercises
- Write a program to check if a number is odd or even (hint: find the modulus of the number by 2, and if the modulus is equal to 1, then the number is even; else the number is odd).
- Take inputs of three variables (Name, Age, and Email) from a user. If the age is greater than 20, print all the variables. If the age is equal to or less than 20, print "Sorry! You are not allowed!".
- Take an input of three integers and print the largest integer (hint: follow the previous example)
- Take the input of the marks of a student (four subjects) and find his GPA (hint: take variables as float; use if conditions to find the GPA of a subject; then add all the GPAs, pide the total with the total number of subjects, and print the value).
- Define the days of a week from 1 to 7. Take an input of the day number, and if the day number is odd, print "Have a lovely day;" if the day number is even, print "It is a lovely day!"
推薦閱讀
- 繪制進(jìn)程圖:可視化D++語(yǔ)言(第1冊(cè))
- Big Data Analytics with Hadoop 3
- Instant Raspberry Pi Gaming
- 大學(xué)計(jì)算機(jī)基礎(chǔ):基礎(chǔ)理論篇
- 嵌入式系統(tǒng)應(yīng)用
- 21天學(xué)通C++
- SharePoint 2010開(kāi)發(fā)最佳實(shí)踐
- 工業(yè)機(jī)器人現(xiàn)場(chǎng)編程(FANUC)
- JBoss ESB Beginner’s Guide
- 電腦主板現(xiàn)場(chǎng)維修實(shí)錄
- Kubernetes for Serverless Applications
- 水下無(wú)線(xiàn)傳感器網(wǎng)絡(luò)的通信與決策技術(shù)
- 從零開(kāi)始學(xué)C++
- 液壓機(jī)智能故障診斷方法集成技術(shù)
- Visual Studio 2010 (C#) Windows數(shù)據(jù)庫(kù)項(xiàng)目開(kāi)發(fā)