Question: Write a C 1 5 0 0 program that will check if the summation of your last 4 digits of the ICM ID is even

Write a C1500 program that will check if the summation of your last 4 digits of the ICM ID is even (i.e., it is divisible by 2). The program will take four inputs from the user as the last four digits and calculate accordingly. Finally, output 1 if your student number is even, or output 0 if your student number is odd. Assume, if the last 4 digits are 0000 then use 1000 instead. Remember to include your ICM ID in the comment at the beginning of your program.
Examples:
i)
If user gives input: 2,3,8,9 Expected output: 1(since 2+3+8+9=22, which is an even number)
ii)
If user gives input: 3,5,0,7 Expected output: 0(since 3+5+0+7=15, which is an odd number)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!