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...

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


Please Help Members By Posting Answers For Below Questions

describe about storage allocation and scope of global,exterm,static,local and register variables in c language?

2368


How many codes are used when u design a Pressure Vessel

1856


how can i install windows-xp operating system in single time to 50 computersconnected in a LAN.

2386


write program which accept information about 5 student & display same information according to ascending order of their name??

2953


i m doing engg in IT .for getting job which courses i have to do?

2096


anybody, Please send me the NIC(scientific officer/programmer) model questions papers to this mail id:imtiyazahamed14@gmail.com

2038


What do you mean by client /server for a post scarcity world

2743


Please send the details and fee for Intools training course..I would like to do the course in second week of jUNE 2010.

2246


can any give an exact example about, resolving the sql errorcode -305

1924


how to avoid a class from getting inherited but respective class should be able to instantiate ?

1951


Hi all, Pls find the bellow mentioned interview questions related to hp-unix. 1. Job Scheduling; mainly crontab, at, batch command 2. Backup stetegy; incremental, full system back up; diff between tar & ufsdump 3. diff between hard link & softlink 4. How to list only the directories inside a directory (Ans. ls -l|grep "^d") 5. RAID levels; pros & cons of diffrent levels; what is RAID 1+0 6. How to recover a system whose root password has lost? 7. What is a daemon? 8. How to put a job in background & bring it to foreground? 9. What is default permissions for others in a file? 10. Questions on shell initialization scripts? 11. Questions on restricted shell 12. What is diff betwn grep & find? 13. What is egrep? 14. Questions on shell programming 15. What is a pipe? 16. Questions on Solaris patch management like pkgadd etc Thnaks & Regards Biswanath Das Email ID:biswanath_das84@yahoo.com

2428


what is the quantity of cement and sand in 1 sq.m (mortar ratio ) a, 1:4 b, 1:3 c, 1:6

1971


what are the efficient way or solutions to avoid ABEND=S04C.

6521


Based on the Job Description above, please indicate in details why you are a good match for this position?

2305


C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER

5370