Your First Function

Lab C Beginner 10 points

Complete int square(int x). The starter reads a number and prints square(n).

Input

One integer.

Output

Its square.

Example

Input

7

Output

49
Sample input available Sample output available
Editor
C

Hints

The type before the name is what the function returns.

Solution explanation

A function takes inputs (parameters) and gives back one value with return.

Show solution
#include <stdio.h>

int square(int x) {
    return x * x;
}

int main() {
    int n;
    scanf("%d", &n);
    printf("%d\n", square(n));
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD