- 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!"
推薦閱讀
- 中文版Photoshop CS5數碼照片處理完全自學一本通
- 極簡AI入門:一本書讀懂人工智能思維與應用
- 機器人智能運動規劃技術
- Mastering D3.js
- ROS機器人編程與SLAM算法解析指南
- Visual C# 2008開發技術詳解
- 數據挖掘方法及天體光譜挖掘技術
- Python:Data Analytics and Visualization
- Serverless Design Patterns and Best Practices
- Instant Slic3r
- 機器人剛柔耦合動力學
- SolarWinds Server & Application Monitor:Deployment and Administration
- 歐姆龍CP1系列PLC原理與應用
- Flash 8中文版全程自學手冊
- 工業控制系統安全