Lab 2
Lab 2
1. #include <stdio.h>
2.
3. int main(void)
4. {
5. printf("Hello World!");
6. return(0);
7. }
CPCS202 ‐ The Lab Note Lab 1
10 Input / Output Functions
10. Type the following program carefully including spaces. Compile, run and save as:
hello2.c
1. #include <stdio.h>
2.
3. int main(void)
4. {
5. printf("Hello World!\n");
6. printf("Fine thank you.");
7. return(0);
8. }
Homework:
1. Write a program that gets the ID (as integer), gender (as character), and
temperature (as double) from the user. Then, display the values of the three
variables using one printf statement?
Hints:
1. Save your homework in your USB flash memory.
2. Write your name & your ID number in the first line in your HW file.
3. Take a copy from your output window by clicking Alt + Print Screen and paste it in
your HW file in the same page.