Report Template
Report Template
EXPERIMENT NO 2
Objective: In this lab we are about to learn further more about cout and cin statements in
detail and different types of variables or datatypes which are int,float,double
float,char,string, and bool and we are going to use them in different programs.
LAB ASSESSMENT:
Data presentation
Experimental results
Conclusion
Lab Tasks
Task # 1
Write a program that inputs name,age,address from the user and then displays these values on the screen.
2
Computer Programming Lab Air University, Islamabad
Task # 2
Write a program that calculates the gravitational force F.
3
Computer Programming Lab Air University, Islamabad
Task # 3
Write a C++ program that takes two floating point numbers and show the
sum,difference,multiplication,division and modulus result.
4
Computer Programming Lab Air University, Islamabad
Task # 4
Write a program that inputs time in seconds and converts it into hh-mm-ss format.
5
Computer Programming Lab Air University, Islamabad
Conclusion:
In this lab we learned about cout and cin statements in detail and how and when to use different types of
variables or datatypes which are int,float,double float,char,string,bool. We practiced all these variables by
using them in different C++ programs.