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 remove the leading spaces from a string?

644


What is the difference between int main and void main?

582


What is echo in c programming?

567


What does typedef struct mean?

672


How macro execution is faster than function ?

677






Explain what are multidimensional arrays?

613


What is the use of a static variable in c?

599


What is structure packing in c?

617


What is the purpose of void in c?

628


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1549


What is modeling?

655


What is the difference between formatted&unformatted i/o functions?

624


What does emoji p mean?

614


Why do we use int main instead of void main in c?

634


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

1606