c code
Write a main function that performs the following: • Print on the screen your name and surname. On the beginning of a new line print the course name and your section number in the same line and on the beginning of another new line print your student ID. You are allowed to use only one print function, not three!(3 points) • Define an unsigned integer variable N. Prompt the user to enter from the keyboard the sum of all numbers of your student ID. (eg. if your student ID is 62134 than 6+2+1+3+4=16 should be entered and stored in N using the keyboard) (2 points) • Initialize a second unsigned integer control variable i to 1 and using a for loop, find and print all odd numbers less than N. (10 points) • Calculates and prints the average of all odd numbers less than N. You can use an additional control variable for counting all odd numbers less than N. (10 points)
c code
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am