answersLogoWhite

0


Best Answer

#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);
}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find square of an integer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Wrie a program to receive an integer and find its octal equivalant?

Use %o


What is the code of a c program that will read in a positive integer value and determine If the integer is a prime number and If the integer is a Fibonacci number?

see the program


How do you Write A program in c language for checking a diagonal matrix?

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.


Is -5 a integer?

1 hour ago my c program said no, but now I know 5 actually is an integer!


How do you find an area of a shape rectangle square and a circle in C program?

By using that one thing.


How do you write a c program to find square of a no using call by value?

int square (int N) return N*N;


C code for magic square?

the way of learning c program


Program for sin series in c language?

find the program in c-pgms.blogspot.com


How do you Write a C program to reverse an Integer number.?

Reference:cprogramming-bd.com/c_page2.aspx# reverse number


Write a C program to find the square of two numbers?

Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.


How do you find length of integer variable in c?

It doesn't have length, but you can use sizeof to find out its size.


How do you write a C Program to fill up an Integer Array?

Reference:cprogramming-bd.com/c_page1.aspx# array programming