Question: I am a Beginner in Functions.I wanna integrate that Functions in my main program. The program should scan a int number and then square it(sum=b\*b). Then the program should output the result.

```
#include <stdio.h>
#include <stdlib.h>
void funktion(int);
void out(int);
int main(int)
{
int sum,b,v,w,z;
{
    funktion();
    calculator();
    out();
    printf("%i",sum);
}
return 0;
}

void funktion(int v)
{
printf("Enter any number that is to be squared!");
}
void calculator(int w) //calculate b*b
{
scanf("%i",&b);
sum=b*b;
}
void out(int z)
{
printf("Sum:");
}

```

Please give me some tips. ;)
Thx & Best regards!

Answer: 
Are you looking for this kind of solution: i just made little changes. you may need to do some initializing things if u gonna use this code

```
#include <stdio.h>
#include <stdlib.h>
void funktion(int);
void out(int);
int main()
{
int sum,b;
{
    printf("Enter any number that is to be squared!");  
    scanf("%i",&b);

    sum = funktion(b);
    out(sum);
}
return 0;
}

int funktion(int b)
{
    return b*b;
}
void out(int sum)
{
    printf("Sum:%d",sum);
}

```
```
void funktion(int);
void out(int);

```

These two functions need not contain any arguments as you declared to be `int's`, because you are not performing any computation on `sum`, since they are just prints inside those functions.

So make them as,

```
void funktion(void);
void out(void);

```

and call those routines as,

```
funktion();
out();

```