Twishadwivedi Pic1
Twishadwivedi Pic1
Experiment No: 1
Title: Working with data types and operators
COs to be achieved:
CO1: Understand the concepts of data types and operators
Theory:
Area and Circumference of Circle. Ask the user to enter the value of the radius of a circle. Put the
values in the formula for finding the area of a circle and the circumference of a circle and print the
outcome for area of a circle and the circumference of a circle.
Input of the distance between two cities in kilometers and converting them into meters, centimeters,
feet, and inches.
Ex- If there are two cities "Gwalior" and "Delhi", their distance is 500 kilometers, after converting
the distance from a kilometer, the distance value will be: 500000 meters, 1640420 feet, 19685050
inches, and 50000000 centimeters.
Problem Statements:
Write a program for the following
1. Compute the area and circumference of a circle.
2. Read the distance between two cities in KM and print that distance in meters, feet, inches,
and centimeters.
Code :
2.Read the distance between two cities in KM and print that distance in meters, feet, inches, and
centimeters.
Output:
2.Read the distance between two cities in KM and print that distance in meters, feet, inches, and
centimeters.
Conclusion:
In this lesson we learned about the basics of C programming and learned the syntax and meaning for
printf and scanf , different input output functions
We also learned about the basic data types and how to use them along with their order of precedence
In addition to this we learned to code a basic program in the C language
Understood the concept of datatypes and operators