Question: ... The following code gets two integer values from the user and displays the sum of them as the output. #include int main(void) {
... The following code gets two integer values from the user and displays the sum of them as the output. #include int main(void) { } int num1; int num2; int sum; printf("Enter first number: "); scanf("%d", &num1); printf("Enter second number: "); scanf("%d", &num2); sum = num1 + num2; printf("Sum of the entered numbers: %d", sum); return 0; A) Change the code to produce the result in the following format (use the escape sequence and \t), in which num1, num2 and sum should be the actual values of the corresponding variables. 1 numl + num2 = sum ELU B) By adding just one statement to the above program, display your name and student id in two separate lines as follows before prompting the user to enter the first number. myName, Student ID, Enter first number: Part C: Selection Statements Exercise 5: Write a C program to get an integer number and check whether the given number is even or odd. Exercise 6: Write a C program to determine if a given year is a leap year. Note: Leap year has 366 days instead of 365 days. Every 4 years we have a leap year. A leap year is a non-century year which is evenly divisible by 4. A century year is the year which ends with 00 (e.g., 1900, 2000, etc. ). Century year also can be a leap year if it is evenly divisible by 400.
Step by Step Solution
There are 3 Steps involved in it
The image you have provided contains a C program that prompts the user to input two numbers and then ... View full answer
Get step-by-step solutions from verified subject matter experts
