Computer Science, asked by rockingstar16, 11 months ago

write a program to print first 10 odd numbers.

Answers

Answered by sindhusharavuri
2
i=1
while i <=10;
print (i, "\n")
i+=2

hope it is right

piyushatre29: sorry but it will print upto 9 only.. it doesn't print 10 odd number..
piyushatre29: IT'S kk.. nice try.. i hope u will be a great learner in future.. :-)
Answered by piyushatre29
1

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();

int i=0,odd=1;


while(i<=10)

{

odd=odd+2;

printf("\n%d",odd);


i++;

}

getch();

}

i hope it will help u..

mark me as brainleist if my answer deserve.. :-)


hiwayrider34: isn't working
Similar questions