C Program 60
C Program 60
C Program 60
(1 to 10)
Output-
Enter value of radius of cylinder:10
Enter value of height of cylinder:20
Surface area of cylinder is:1800.00
Volume of cylinder is:6000.00
………………………………………………………………………………………………………………………….
Output-
Enter 2 Employee Details
Employee 1:-
Name: Aditya
Id: 001
Salary: 50000
Employee 2:-
Name: Shivam
Id: 002
Salary: 60000
Name : Shivam
Id :2
Salary : 60000
………………………………………………………………………………………………………………………….
Output-
Enter radius of circle:2
Area of circle:12.560000
Circumference of circle: 12.560000
………………………………………………………………………………………………………………………….
Output-
Enter the value of x:2
Enter number of terms:3
The sum is:5.000000
………………………………………………………………………………………………………………………….
Output-
Enter temperature in fahrenheit:45
Temperature in celsius:7.222222
………………………………………………………………………………………………………………………….
Output-
1. Length of string
2. Copy String
3. Connect Two Strings
4. Compare two strings
5. Exit
Enter your choice:1
1. Length of string
2. Copy String
3. Connect Two Strings
4. Compare two strings
5. Exit
Enter your choice:2
1. Length of string
2. Copy String
3. Connect Two Strings
4. Compare two strings
5. Exit
Enter your choice:3
1. Length of string
2. Copy String
3. Connect Two Strings
4. Compare two strings
5. Exit
Enter your choice:4
1. Length of string
2. Copy String
3. Connect Two Strings
4. Compare two strings
5. Exit
Enter your choice:5
………………………………………………………………………………………………………………………….
AM=((a+b))/2;
HM=a*b/((a+b));
printf("Arithmetic Mean is:%f",AM);
printf("\nHarmonic Mean is:%f",HM);
getch();
}
Output-
Enter the 1st number:10
Enter the 2nd number:20
Arithmetic Mean is:15.000000
Harmonic Mean is:6.000000
………………………………………………………………………………………………………………………….
printf("Showing Information:\n");
printf("ID:%d\n",s.ID);
printf("Name:");
printf("%s",s.name);
printf("Marks:%.2f\n",s.marks);
return 0;
}
Output-
Enter Information:
Enter name:Aditya
Enter ID:001
Enter marks:80
Showing Information:
ID:1
Name:Aditya
Marks:80.00
………………………………………………………………………………………………………………………….
Q9. Write a C program to accept dimensions length (l),
breadth(b) and height(h) of a cuboids and display surface
area and volume
(Hint : surface area=2(lb+lh+bh ), volume=lbh )
Input-
#include <stdio.h>
int main()
{
float length,breadth,height;
float surfacearea, volume;
Output-
Enter length of the cuboid:10
Enter breadth of the cuboid:20
Enter height of the cuboid:30
__________________________________
Surface area of cuboids is:2200.00
Volume of cuboids is:6000.00
………………………………………………………………………………………………………………………….
Output-
Enter any sentence:Iam I an m a good boy54665444545
The Replacement is.....
i*AM*A*GOOD*BOY???????????
Aditya
---------------------------------------------------------------------------------------------------------