can please someone teach me how to create this program using
while statement.. this is the output should look like
0
2
4
6
8
10
-thanks.. :) need it asap...
Answers were Sorted based on User's Feedback
Answer / rameshwari
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
while(i<=9)
{
printf("%d", i);
i=i+2;
}
getch();
}
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / manish soni bca 3rd year jaipu
#include<stdio.h>
#include<conio.h>
void main()
{
int cnt,term;
cnt=0;
while(cnt<6)
{
cnt+=1;
term=(cnt*2-1)^1;
printf("%d\n",term);
}
getch();
}
manish soni tagore biotech collage jaipur
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sandeep kumar yadav
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
clrscr();
while(i<=10)
{
printf("%d\n",i);
i+=2;
}
getch();
}
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ashish rajvanshi
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
for(i=0;i<=10;i=i+2)
printf("%d\n",i);
}
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / parth ujenia
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
while(i<=9)
{
printf("%d", i+2);
}
getch();
}
Is This Answer Correct ? | 1 Yes | 5 No |
Answer / prakash kavar
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
while(i<=9)
{
printf("%d", i+2);
i=i+2;
}
getch();
}
Is This Answer Correct ? | 0 Yes | 5 No |
Answer / ajit kumar shrivastav
#include<conio.h>
#include<stdio.h>
void main();
{ flaoat num;
scanf(enter a number);
printf("%f",res);
res=num*2;
getch();
}
Is This Answer Correct ? | 0 Yes | 6 No |
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?
main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }
Why isn't any of this standardized in c? Any real program has to do some of these things.
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation
What is header file in c?
explain what is fifo?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
what will be printed by this printf? printf("%c",printf("hi")["sharkselva"])); }
Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child
write a reverse string to print a stars.(with out using logic) ***** **** *** ** *
what is difference between array of characters and string
What is the difference between struct and typedef struct in c?