answersLogoWhite

0

#include <stdio.h>

#include <conio.h>

void main()

{

int n=0;

printf("\n\nEnter a number: ");

scanf("%d", &n);

n=n*n;

printf("\nThe square is %d ", n);

getch();

}

BY: Eng . Ali Saed

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
BeauBeau
You're doing better than you think!
Chat with Beau
More answers

#include<iostream> int main()

{

double x=rand();

std::cout<<"The square root of "<<x<<" is "<<sqrt(x)<<std::endl;

}

User Avatar

Wiki User

11y ago
User Avatar

public class Test {

public static void main(String[] args){

int x = 10;

System.out.println("Square value = " + (x * x));

}

}

User Avatar

Wiki User

16y ago
User Avatar

Add your answer:

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