Uploaded by Shakil Ahamed

CSE-1112-Lab-Quiz-2-Set-B

advertisement
Shanto-Mariam University of Creative Technology
Departments of CSE & CSIT
CSE 1112: Introduction to Computer Systems Sessional
Lab Quiz 2
Time: 30 minutes
Name :
ID
Dept:
Group:
:
1. Write a C program to take an integer input and determine if that’s positive or negative.
2. Write a C program to determine and print the kinetic energy of a moving object using the
formula 𝐾. 𝐸. =
1
2
5
5
2
𝑚𝑣
where m and v are user inputs.
3. Write a C program to calculate and print the sum from 1 to 5 using a while loop.
5
Download