Solved programming problem

Print Integer with function in C.

Source code

#include<stdio.h>

void print(int m) ///Receive the integer

{

   printf("
Your Number: %d
",m);

}

int main()

{

    int n;

    printf("Please Enter A Number: ");

    scanf("%d",&n);

    print(n); ///call the function and pass the integer

    return 0;

}

Output

Please Enter A Number: 10

Your Number: 10

Join the discussion

Add your comment