Page 1 of 1

This is C language programming. Why does printf print together? They're not as separate as they were in the beginning. T

Posted: Mon Mar 21, 2022 4:51 pm
by answerhappygod
This Is C Language Programming Why Does Printf Print Together They Re Not As Separate As They Were In The Beginning T 1
This Is C Language Programming Why Does Printf Print Together They Re Not As Separate As They Were In The Beginning T 1 (75.12 KiB) Viewed 52 times
This is C language programming.
Why does printf print together?
They're not as separate as they were in the beginning.
Thank you for your help~~~~
8 9 #include <stdio.h> 10 11 int main() 12 { 13 char name[50]; 14 int number; 15 while(1){ 16 printf("Please enter your name: \n"); 17 scanf("%[^\n]", name); 18 printf("Please enter your number: \n"); 19 scanf("%d",&number); 20 printf("Your name is : %s\n", name); 21 printf("Your number is : %d\n", number); 22 23 return 0; 24 } 25 input Please enter your name: Alan Please enter your number: 911 Your name is : Alan Your number is : 911 Please enter your name: Please enter your number: