Connect with one of the following accounts


Please wait while we redirect...

Views: 173   

Following program shows how to take a number as input and calculate the square of that number.
In this program we get input from user and prints square of that number using following formula
Square of number = input X input

#include <stdio.h>
int main() {
    int input;
    printf("Please enter a number:");
    scanf("%d", &input);

    int result = input * input;

    printf("Squre of %d is %d", input, result);


Please enter a number: 12
Squre of 12 is 144

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News