1 votes 1 votes #include <stdio.h> int main() { int a=10; while (a<20) { Printf("a value : %d",a); a++; } return0; } This program gives output as - a value: 10a value: 11a value: 12a value: 13a value: 14a value: 15a value: 16a value: 17a value: 18a value: 19 BUT HOW CAN I HAVE OUTPUT LIKE (each output in new line): a value:10 a value:11 . . a value:20 Programming in C programming-in-c output + – iarnav asked Apr 23, 2017 • retagged Jun 4, 2017 by Arjun iarnav 2.0k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments iarnav commented Apr 23, 2017 reply Follow Share #include <stdio.h> int main() { int a=10; while (a<20) { Printf("a value : %d \n",a); a++; } return0; } Gives me this error - prog.c: In function 'main': prog.c:13:1: warning: implicit declaration of function 'Printf' [-Wimplicit-function-declaration] Printf("a value : %d \n",a); ^ prog.c:19:1: error: 'return0' undeclared (first use in this function) return0; ^ prog.c:19:1: note: each undeclared identifier is reported only once for each function it appears in prog.c:21:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ 0 votes 0 votes Arunav Khare commented Apr 23, 2017 reply Follow Share write return 0; write (not 'p' in lower case) printf("a value : %d \n",a); 1 votes 1 votes iarnav commented Apr 23, 2017 reply Follow Share Thank you for making me know the correct syntax! 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes #include <stdio.h> #include<conio.h> void main() { int a=10; while (a<20){ printf("a value : %d\n",a); a++; } getch(); } use this code , u will get ur desired answer. Actually u wrote "Printf" , p will be in lowercase.. akash.dinkar12 answered Apr 23, 2017 akash.dinkar12 comment Share Follow See all 11 Comments See all 11 11 Comments reply Show 8 previous comments akash.dinkar12 commented Apr 23, 2017 reply Follow Share no.. no... it is not like this. getch() is a function , u can call it which comes under "conio.h" (Console input output), which is used to maintain console or command prompt on ur computer screen... 0 votes 0 votes iarnav commented Apr 23, 2017 reply Follow Share Duly noted. Any reference from where to get the basics of C like all of you guys have? I mean, any books?! 0 votes 0 votes akash.dinkar12 commented Apr 23, 2017 reply Follow Share U can follow standard reference books which are suggested by toppers or experienced people. 1 votes 1 votes Please log in or register to add a comment.