saving . . . saved Square of Numbers has been deleted. Square of Numbers has been hidden .
Square of Numbers
Title
Question
#include<stdio.h>
int main( ) 
{
     float number,square;
     printf("Enter any integer value :");
     scanf("%f", &number);
     square=number*number;
     printf("square of a given number%.2f is=%.2f", number, square);
     return 0;
}

C-and-Cpp Functions 03-04 min 0-10 sec 06-12-21, 10:47 p.m. 8220378170

Answers:

Assignments are only for self-assessment. If you have any specific question related to this tutorial please post here.
10-01-22, 3:39 p.m. hbammkanti


#include<stdio.h>
#include<conio.h>
void main()
{
int n,sq;
printf("enter the number :");
scanf("%d",&n);
sq=n*n;
printf("square of a number=%d",sq);
getch();
}

output :
enter the number : 3
square of a number=9
05-08-24, 2:41 p.m. 238T1A05D9


#include<stdio.h>
#include<conio.h>
void main()
{
int n,square;
printf("enter a number:");
scanf("%d",&n);
square=n*n;
printf("square of a number=%d",square);
getch();
}
output
enter a number:7
square of a number=49
12-08-24, 3:06 p.m. 238T1A05G7


#include<stdio.h>
#include<conio.h>
void main()
{
int n,square;
printf("enter a number:");
scanf("%d",&n);
square=n*n;
printf("square of a number=%d",square);
getch();
}
output
enter a number:7
square of a number=49


16-08-24, 4:35 p.m. 238T1A05F5


#include<stdio.h>
#include<conio.h>
void main()
{
int n,square;
printf("enter a number:");
scanf("%d",&n);
square=n*n;
printf("square of a number=%d",square);
getch();
}
output
enter a number:6
square of a number=36
19-08-24, 2:42 p.m. nasreensk2005@gmail.com


#include<stdio.h>
#include<conio.h>
void main()
{
int n,square;
printf("enter a number:");
scanf("%d",&n);
square=n*n;
printf("square of a number=%d",square);
getch();
}
output
enter a number:7
square of a number=49
20-08-24, 7:30 p.m. shaiksaniyamehazabeen@gmail.com


Log-in to answer to this question.