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 it is a preferable option in parallelextender development ?
Tell me about urself? asked me qstns on my resume what about higher studies any plans? where do u find urself after 3-4
How EVA granules manufactured (I wanted to know the manufacturing process). (Virgin Granules) and what are the Raw Materials used.
i want to know about the scope of IT engineers in ONGC
how much lighting lux need for a common walking area at night time
How to create test case scenario?
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
plz plz help me "how can i face dell varcent round"....? plzzzzzzzz help me friends.....?
Suppose that, even unrealistically, we are to search a list of 700 million items using Binary Search, Recursion (the algorithm given in class). What is the maximum number of comparisons that this algorithm must perform before finding a given item or concluding that it is not in the list?
how many gallon in one quseka
How will I MOve Comp-1 variable into next variable without using Move statement?
what is c dot
Can you connect Active Directory to other 3rd-party Directory Services? Name a few options.
what is dns?
I am refused L1-B visa filed by my employer on May 09 by US consulate Chennai. When i am eligible to apply L1-B visa again through my employer?