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
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: