retagged by
1,981 views
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

retagged by

1 Answer

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..

Related questions