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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between the local variable and global variable in c?

591


What is a #include preprocessor?

606


What is pass by value in c?

591


What is the right type to use for boolean values in c? Is there a standard type?

557


a c code by using memory allocation for add ,multiply of sprase matrixes

2293






How will you declare an array of three function pointers where each function receives two ints and returns a float?

770


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3241


What is the process of writing the null pointer?

602


What does char * * argv mean in c?

617


What is the correct code to have following output in c using nested for loop?

604


Why is c called c not d or e?

600


What is const and volatile in c?

560


Explain null pointer.

613


What is getche() function?

601


Is it better to use malloc() or calloc()?

641