Professional Documents
Culture Documents
CP Lab
CP Lab
Lab Tasks:
Task No. 01: Take two integers as input from the user apply
arithmetic operations on them (+, -, *, /) as print them on screen.
Task code:
Output:
Page | 1
TASK NO. 02:
Write a C program to calculate the distance between the two points.
d = (x2 – x1) ^2 + (y2 – y1) ^2
Task Code:
Output:
Page | 2
Post Lab task
Q1. Where a cin does stops during extraction of data?
Ans. Cin will stop its extraction when it encounters a blank space.
a) cout
b) cin
c) coi
Conclusion
Conclusion 01:
ID: 190945
Page | 3
Conclusion 02:
ID: 190321
Conclusion 03:
ID:190333
This was our second lab in which we learnt about variables and
how to use them in programming. We learnt about types of
operations and their usage. Also, we learnt the concept of cin
and cout.
Page | 4
Page | 5