FIND SQUARE OF THE GIVEN NUMBER IN C
#include<stdio.h> //header file stdio.h
#include<conio.h> //header flie conio.h
main() //main function
{ //start of the program
int a; //variable declaration
printf("enter the number ");
scanf("%d",&a); //reading value from user
a=a*a; // formula for square
printf("square of the given number is %d",a);
getch();
} //end of the program
#include<stdio.h> //header file stdio.h
#include<conio.h> //header flie conio.h
main() //main function
{ //start of the program
int a; //variable declaration
printf("enter the number ");
scanf("%d",&a); //reading value from user
a=a*a; // formula for square
printf("square of the given number is %d",a);
getch();
} //end of the program
No comments:
Post a Comment