write a program to print first 10 odd numbers.
Answers
Answered by
2
i=1
while i <=10;
print (i, "\n")
i+=2
hope it is right
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..
Answered by
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.. :-)
Similar questions
Computer Science,
7 months ago
Computer Science,
7 months ago
Math,
1 year ago
Hindi,
1 year ago
Physics,
1 year ago