To Enter An Integer Number And Display It's Square
To Enter An Integer Number And Display It's Square
#include<stdio.h> /*tells compiler to include std input output file.*/
#include<conio.h>/*tells compilers to provide console input/output*/
void main()
{
int x, s;
clrscr(); /*it clear the screen*/
printf("Enter x \n"); /* it prints Enter x in new line*/
scanf("%d",&x,); /*It takes input from user and addresses corresponding to x*/
s = x * x; /*It operates the square i.e multiply two digits x and y*/
printf("Square is %d\n",s); /*It prints the squared number in new line*/
s = x * x; /*It operates the square i.e multiply two digits x and y*/
printf("Square is %d\n",s); /*It prints the squared number in new line*/
getch(); /* return the value zero to OS*/
Post a Comment