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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a wrapper function in c?

575


What are identifiers c?

558


Is it possible to initialize a variable at the time it was declared?

745


What is null in c?

594


What is preprocessor with example?

573






Can I initialize unions?

580


Can the curly brackets { } be used to enclose a single line of code?

709


What are the advantages of using linked list for tree construction?

635


What is scope and lifetime of a variable in c?

566


formula to convert 2500mmh2o into m3/hr

489


Is c compiled or interpreted?

657


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

618


Can main () be called recursively?

621


What is "Hungarian Notation"?

631


What are the features of the c language?

636