Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 11 Weeks Ago, 5 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Write a program that reads an integer and checks whether it is odd or divisible by 4 and prints out the corresponding message
2. Any conversion program (pound to kilos and grams, feet to meters and centimeters etc..
3. Write a program that accepts as input numbers until the user provides the number -1. For theinput numbers, you must compute their sum and print it on screen.
4. Write a program that accepts as input one integer number (e.g n) and prints on the screen theeven numbers and odd numbers between 1 to n.
1SAMPLE MIDTERM EXAMInstructor: E. StylianouPART A (15 points)1. What is the outcome of the following programs? [10 points]a) (1 point)#include <stdio.h>int main(){printf(“This course is\n \\ CSC131”);return 0;}Answer:This course is\ CSC131b) (1 point)#include <stdio.h>int main(){double num1, num2;num1 = 100;num2 = 20;num1 += (1 + num2/100);printf(“Num1 = %.2f”, num1);return 0;}Answer:Num1 = 101.20
Attachments: