Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How can I recover the file name given an open stream?

945


what are bit fields? What is the use of bit fields in a structure declaration?

2042


Explain pointers in c programming?

1060


What is void main ()?

1009


What is scope and lifetime of a variable in c?

988


Can we change the value of static variable in c?

970


What is the use of a static variable in c?

1006


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1020


What is the difference between exit() and _exit() function in c?

1017


How do you generate random numbers in C?

1143


What is a built-in function in C?

1512


What are pointers? Why are they used?

1112


Difference between Shallow copy and Deep copy?

1968


How do you print only part of a string?

964


What does stand for?

1044