100,1,99,2,98,3...... write a C pgm to generate this series
with user input for the number of nos. to b displayed..
Answer Posted / gyanaranjan patra
#include<stdio.h>
void main()
{
static int a=100,i,b=1;
for (i=1;i<=100;i++)
{
printf("%d %d ",a,b);
a=a-1;
b=b+1;
}
}
// this is the simpler one try it;;;;.. ...
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
1) There is a circular pizza with negligible thickness that is cut into 'x' pieces by 4 straight line cuts. What is the maximum and minimum value of 'x' respectively 2)A ship leaves on a long voyage. When it is 18 miles from the shore, a seaplane, whose speed is 10 times that of the ship is sent to deliver mail. How far from the shore does the seaplane catch upon with the ship? 3) If the distance traveled (s) in time (t) by a particle is given by the formula s = 1+ 2t+3t2+4t3, then what is the distance traveled in the 4th second of its motion? 4)3 men finish painting a wall in 8 days. Four boys do the same job in 7 days. In how many days will 2 men and 2 boys working together paint two such walls of the same size?
hi friends.... i want do telecom course, iam getting confused. plz tell me courses and levels in that field. iam fresher B.E ECE student. and plz tell institutes in hydrabad or bangalure.
what is buffer solution?
why this for loop doesn't work . int i; for(i=2;i=0;i--) { cout<
what are the artifacts in coding phase in SDLC????
how will u send the idoc
what is the Relationship between quantity of Gas and capacity of AC machine in tonnage.
I have a backlog in Computer Graphics and unable to clear that subject since 2007. Im from JNTU hyderabad. I dont have internal marks, so im unable to clear the subject. Is there any legal way to get my degree bcos of which i cant get proper job. Please help me.
boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName);
How to create test case scenario?
What is the mistake in the following program segment ? f() { int a; void c; f2(&c,&a);}
plz plz help me "how can i face dell varcent round"....? plzzzzzzzz help me friends.....?
wats the difference between RS latch using NAND n NOR gate? which is to be preffered?
pls i need a help from you friends, is there anybody who can help me out with the question been ask from the USA embassy. i will be going for interview next month pls help me
how do we get persistent databases?