[ create a new paste ] login | about

Link: http://codepad.org/QLUCPxB7    [ raw code | output | fork ]

C, pasted on Apr 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<stdio.h>

void square();

void main()
{
    int num=5;
    square(num);
}

void square(int num)
{
    int result;
    result = num * num;
    printf("The result is %i", result);
}


Output:
1
The result is 25


Create a new paste based on this one


Comments: