Write a C program to calculate the square of an integer using Preprocessor Directive.
Sample Input 1:
11
Sample Output 1:
121
Sample Input 2:
8
Sample Output 2:
64
Implementation of the above problem:
#include<stdio.h>
#define k 10
int main()
{
int n;
scanf("%d",&n);
printf("\n%d",n*n);
return 0;
}
Thanks
Mukesh Rajput
Post A Comment:
0 comments: