diff --git a/c-basic/print_example_with_scan.c b/c-basic/print_example_with_scan.c new file mode 100644 index 0000000..5a09d15 --- /dev/null +++ b/c-basic/print_example_with_scan.c @@ -0,0 +1,20 @@ +#include + +int main() +{ + int a , b ; + + printf("enter a number\n"); + scanf("%d", &a); + + printf("enter b number\n"); + scanf("%d", &b); + + printf("a is %d\n", a); + printf("b is %d\n", b); + + printf("a is %d b is %d\n", a, b); + printf("b is %d a is %d\n", b, a); + + return 0; +}