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 / suren
#include<stdio.h>
void main()
{
int i,j,n,count;
printf("Enter the number of numbers to be printed\n");
scanf("%d",&n);
for(i=100,j=1,count=0;count<n;i--,j++,count++)
{
printf(" %d ",i);
if(++count>=n)
return;
printf(" %d ",j);
}
}
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
WHY WE USE {} AT THE STARTING OF C PROGRAM
how to handle errors in fastload?
am a textile eng. frombut with major of my course including chemical eng, subjects, can i too apply to the co.?
Write a nonrecursive routine to reverse a singly linked list in O(N) time.
What are the frequently asked technical engineer ques?
if we give you the job AS A PETROLEUM ENGINEER WHAT WILL YOU DO(that is extraordinary) for our company
WHAT IS DIFFERENCE BETWEEN ART & VECTOR QUANTISATION BASED ON THEIR APPLICATION IN NEURAL NETWORK
Prepare the UGC CSIR net question papers those are enough. The question paper will be of 50 questions in size each 3 marks and with a negative of -1 for each wrong answer
Hi friends..cud any help to get QC 9.2 trial..i tried with HP site but did'nt got it..please help me out
what is total power generation capacity in india at present (as on 12-12-2011)
How to control the Relative humidity in Air handling unit in Pharmaceutical company ,the AHU is comprised with DX system(Cooling coil) and dry heaters. We are facing the RH issue low side and higher side.
hi to all,i done ccna,now im looking job,but it is very diffcult to get job in networking field,.........i dnt know what im doing wrongly,kindly help me and give the proper way...i have so much of interest in this field only
How many VLANs are supported on a single switch
describe about storage allocation and scope of global,exterm,static,local and register variables in c language?
what are basic step involved in embedded system software development?