Initial Basics – Algebra – Problem #7
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Problem Statement
Submit one (single) C program. Write a C program to perform the following tasks. 1. Take as input the first 2 digits of your roll number. Let this number be a. 2. Next, take as input the next 2 characters of your roll number. 3. Then take as input the last 5 digits of your roll number. Let this number be b. 4. Print "Hello" followed by your full roll number. Eg. Hello 21CS10001. 5. Compute y = 1.234x105 +7.5x10-³ + b. 6. Print y. 7. Compute z = a+++ -b + b-. 8. Print a,b,z at the end of the computations. You may need to use math library function : #include imath.h If you want to compile useing the terminal then use the command gcc./program.c-Im Proper commenting, indentation and output commands carry marks.