Write a complete program that declares an integer variable, reads a value from the keyboard into that variable, and writes to standard output a single line containing the square of the variable's value. Besides the line and the number it contains, nothing else should be written to standard output.

Respuesta :

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

  // variables

  double num;

  // read discriminant

  cin>>num;

  // calculate square of the input

  double result=num*num;

  // print the square number

  cout<<result<<endl;

     return 0;

}

Explanation:

Declare a variable "num".Read the value of "num" from keybord.Then calculate square of the input number.Print the square of input number.

Output:

5

25

RELAXING NOICE
Relax