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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can the size of an array be declared at runtime?

827


What is the explanation for cyclic nature of data types in c?

892


What are pointers in C? Give an example where to illustrate their significance.

980


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

2003


Should a function contain a return statement if it does not return a value?

833


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

1983


Write a program for Overriding.

930


what are bit fields in c?

1213


What is pointers in c with example?

810


What is sizeof int in c?

834


What is volatile keyword in c?

789


What are the advantages of union?

842


Explain can the sizeof operator be used to tell the size of an array passed to a function?

815


Not all reserved words are written in lowercase. TRUE or FALSE?

998


What is a method in c?

831