1. Write a Program to Take input from user Print Square and cube c program .
2. write a Program To take input from user print Simple interest c program .
3. Write a Program to Take input from user Print Circumference C Program .
1.
Write a Program to Take input from user Print Square and cube c program - Program code.
// Write a program to take input from user print squaer and cube.
#include<stdio.h>
#include<conio.h>
int main()
{
int n,squaer,cube;
clrscr();
printf("Enter the value of n :");
scanf("%d",&n);
squaer = n*n;
cube = n*n*n;
printf("Squaer is %d\n",squaer);
printf("Cube is %d",cube);
getch();
return 0;
}
OUTPUT :-
2.
Download Program source code
2.
write a Program To take input from user print Simple interest c program - Program Code.
// Write a program to take input form user and print simple interest.
#include<stdio.h>
#include<conio.h>
int main()
{
float interest,p,r,n;
clrscr();
printf("Enter the value of p:");
scanf("%f",&p);
printf("Enter the value of r:");
scanf("%f",&r);
printf("Enter the value of n:");
scanf("%f",&n);
interest=(p*r*n)/100;
printf("Simple interest is %f",interest);
getch();
return 0;
}
PROGRAM :-
Download Program source code
3.
Write a Program to Take input from user Print Circumference c program - Program Code
//Write a program to take input from user print Circumference
#include<stdio.h>
#include<conio.h>
#define pi 3.14
int main()
{
float radius,c;
clrscr();
printf("Enter the value of Radius :");
scanf("%f",&radius);
c= 2 * pi * radius;
printf("Circumference is %f",c);
getch();
return 0;
}
PROGRAM :-
Download Program source code
0 Comments
If You have any query, Please let me know..