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
describe about storage allocation and scope of global,exterm,static,local and register variables in c language?
How many codes are used when u design a Pressure Vessel
how can i install windows-xp operating system in single time to 50 computersconnected in a LAN.
write program which accept information about 5 student & display same information according to ascending order of their name??
i m doing engg in IT .for getting job which courses i have to do?
anybody, Please send me the NIC(scientific officer/programmer) model questions papers to this mail id:imtiyazahamed14@gmail.com
What do you mean by client /server for a post scarcity world
Please send the details and fee for Intools training course..I would like to do the course in second week of jUNE 2010.
can any give an exact example about, resolving the sql errorcode -305
how to avoid a class from getting inherited but respective class should be able to instantiate ?
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
what is the quantity of cement and sand in 1 sq.m (mortar ratio ) a, 1:4 b, 1:3 c, 1:6
what are the efficient way or solutions to avoid ABEND=S04C.
Based on the Job Description above, please indicate in details why you are a good match for this position?
C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER