(a) reads a user input integer that computes and displays the sum id the digits in the integer. (b) Computes and display
Posted: Sun Jul 03, 2022 11:59 am
(a) reads a user input integer that computes and displays the sum id the digits in the integer.
(b) Computes and displays 3 times the sum found in part (a)
(c) test the program with the three trial integers given: 256, 2310 , and an 8 digit integer picked by you.
these are the simplified requirements i will post a picture of an example.
1. (28%) Write a C# program (console application project or any other project type you are comfortable with) that (this question is the same as exercise 1 question). (a) (10%) Reads an integer from keyboard and computes and displays the sum of digits. (for example, if you input 2310, it should compute 2+3+1+0=6 and display "The sum of digits of 2310 is 6" Note: you should not have special logic using integers like 100, 1,000, 10.000 etc. However integer 10 is needed. Also do NOT use arrays or strings to do this question, it can be done by for loop and arithmetic expressions: +-*/%. (b) (8%) Computes and displays 3 times the sum of digits in part (a). For example, if 2310 is read in, you will compute and display "3 times the sum of digits of 2310 is 18" (c) (10%) Test your program with 3 integers: 256, 2310, and an integer of 7 digits or 8 digits picked by you.
(b) Computes and displays 3 times the sum found in part (a)
(c) test the program with the three trial integers given: 256, 2310 , and an 8 digit integer picked by you.
these are the simplified requirements i will post a picture of an example.
1. (28%) Write a C# program (console application project or any other project type you are comfortable with) that (this question is the same as exercise 1 question). (a) (10%) Reads an integer from keyboard and computes and displays the sum of digits. (for example, if you input 2310, it should compute 2+3+1+0=6 and display "The sum of digits of 2310 is 6" Note: you should not have special logic using integers like 100, 1,000, 10.000 etc. However integer 10 is needed. Also do NOT use arrays or strings to do this question, it can be done by for loop and arithmetic expressions: +-*/%. (b) (8%) Computes and displays 3 times the sum of digits in part (a). For example, if 2310 is read in, you will compute and display "3 times the sum of digits of 2310 is 18" (c) (10%) Test your program with 3 integers: 256, 2310, and an integer of 7 digits or 8 digits picked by you.