Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 268 Bytes

File metadata and controls

24 lines (21 loc) · 268 Bytes

Use scanf to read in multiple numbers.

int n1, n2, n3;
printf("Enter n1 n2 n3\n");
scanf("%d %d %d", &n1, &n2, &n3);
printf("%d %d %d\n", n1, n2, n3);

Output

Enter n1 n2 n3
1 
2
3
1 2 3

Output

Enter n1 n2 n3
1 3 4
1 3 4