#include
#include
void main()
{
long int n;
printf("Please enter the number");
scanf("%ld" ,&n);
n=n*n;
printf("Square of entered number = %ld ");
}
but if you want to show the entered number e.g.Square of the entered number 8=64
then below is the code.
#include
#include
void main()
{
long int m,n;
printf("Please enter the number");
scanf("%ld" ,&n);
m=n;
n=n*n;
printf("Square of entered number %ld = %ld ",m,n);
}
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
By using that one thing.
Reference:cprogramming-bd.com/c_page1.aspx# array programming
It doesn't have length, but you can use sizeof to find out its size.
I assume you mean is an if the number is an integer multiple of 3i am unfamiliar with C but the theory would be,find if a is integer multiple of 3b=a/3b==round(b).if 1 "yes"else "no"this is an inefficiency way but will get the job done
Use %o
see the program
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
1 hour ago my c program said no, but now I know 5 actually is an integer!
By using that one thing.
int square (int N) return N*N;
the way of learning c program
find the program in c-pgms.blogspot.com
Reference:cprogramming-bd.com/c_page2.aspx# reverse number
Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.
Reference:cprogramming-bd.com/c_page1.aspx# array programming
It doesn't have length, but you can use sizeof to find out its size.