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

Explain which function in c can be used to append a string to another string?

1136


Why do we use static in c?

1174


What is an endless loop?

1317


write a program to rearrange the array such way that all even elements should come first and next come odd

2348


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1178


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5530


What is character set?

1214


What is the correct declaration of main?

1261


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2343


Differentiate between declaring a variable and defining a variable?

1086


What does the error message "DGROUP exceeds 64K" mean?

1271


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2179


a program that can input number of records and can view it again the record

1959


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2056


What is difference between scanf and gets?

1366