- 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 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!"
推薦閱讀
- 亮劍.NET:.NET深入體驗與實戰(zhàn)精要
- 計算機應用
- Seven NoSQL Databases in a Week
- Python Data Science Essentials
- STM32G4入門與電機控制實戰(zhàn):基于X-CUBE-MCSDK的無刷直流電機與永磁同步電機控制實現(xiàn)
- 基于32位ColdFire構(gòu)建嵌入式系統(tǒng)
- Android游戲開發(fā)案例與關(guān)鍵技術(shù)
- Linux內(nèi)核精析
- 電氣控制與PLC原理及應用(歐姆龍機型)
- PowerMill 2020五軸數(shù)控加工編程應用實例
- 基于人工免疫原理的檢測系統(tǒng)模型及其應用
- Learn Microsoft Azure
- FreeCAD [How-to]
- 暗戰(zhàn)強人:黑客攻防入門全程圖解
- 深度學習實戰(zhàn)