0
How to square a number in c++ program?
2 Respuestas
+ 2
The syntax for C would be :
#include<stdio.h>
int main()
{
int a=9;
int b=a*a;
printf("%d",b);
return 0;
}
+ 1
#include<math.h>
a=2;
sq=a*a;
cout<<sq;
or
sq=sqr(a)
cout<<sq;