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 / niveditha

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n,count=0;
printf("enter the number of no's to be displayed");
scanf("%d",&n);
for(i=100,j=1;count<n;i--,j++)
{
printf("%d,",i);
count=count+2;
if(count<=n)
printf("%d,",j);
}
getch();
}

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what should be the finish work of a carpenter per day

1715


minimum percentage in B.E in(INFORMATION TECHNOLOGY) to be eligible for IES exam qualification and also for reserved categories.are IT engineers are eligible for giving IES exams? please reply soon.

1930


what is total power generation capacity in india at present (as on 12-12-2011)

1653


If any kind of accident happen without any information to any one .what kind of action we have to take

1371


How to create test case scenario?

1754






WHERE CAN I GET SQL SERVER NOTES SOFT COPY?

1341


10. Write a program in ā€˜Cā€™ language that will perform the following operation on double link list. Each node of this list contains the address of previous as well as next node. The previous pointer of first node & next pointer of last node should contain null. 1. Creation of list with as many records as user want 2. Search a node in the list 3. Deletion at last position 4. Display 5. Exit Create separate functions for each operation. The create () will be used to create the list. It should accept no argument & return the address of the starting node. Search() will search a node in the list. It receives rollno as argument & return that node if found otherwise return null. The delete () function will delete the last node. It does not receive any argument & return structure type value at last position. The starting node of the double list must be declared as external pointer variable. Each element of double link list will contain the following information Roll No, Std Name, Course. Use do-while loop & switch case for generating the above menu. The format of the output should is given below: S.No. Roll No. Student Name Course 1 cse01 Anil Singh B.Tech

1469


what is need of interface. what is the diff b/w interface and abstract class

1376


Hi manikandhan, my name is ruby. Can u pls forward the conduct/character certificate on my Id. ruby_cse07@yahoo.co.in what details shall i require for this certificate. pls help me out with this..its really very urgent.. let me know soon bcoz my interview is on 19th septemper in mumbai...

1634


WAP in Java to print the format AMIT M I T

1608


difference between windows 2003 and windows 2008 server

1646


What are annotations? What are assertions? why they are used why not if-else?? what is normalization? what is QuickSort? what are Avl trees?

1830


Given a number (N), program to check whether its binary form has periodic or not

1602


what is means of admistrative distance

1593


What would be your first invention?

735