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
WHAT IS THE NAMESPACE FOR CUSTOMCONTROL AND USER CONTROL IN ASP.NET?
is the used fire extinguisher fall under Hazardous waste material?
What is The Need of Template?
Write a program to maintain a singly linked list having the following functions: a) Creation of the list b) Displaying the list. c) Swap all nodes at consecutive even odd positions. E.g.: The nodes at position 1 should be swapped with node 2, node 3 with node 4 and so on.
i want to know how can i divide the bandwidth among two computers.say i have a connection of 256 kbps dsl connection. i have a switch.now i want to divide this 256 kbps in two 128,128 equal connections.so that both of us can work on our separate 128 speed
Tell me all about production of drought and its losses In the boiler?
Explain force?
computer is male or female.....???
What is the pressure in co2 cartridge in a DCP 5 kg extinguisher.
I am from B.Tech back ground, i had Applied to do masters in Engineering management, and university gave Admission and sent I-20, if the interviewer asks why are doing masters in this field, even you are from B.Tech (information technology)? Can any one give me relevant answer, if interviewer asks that question
Has anyone attended interviews in IITs for positions like Research fellowships/assistants? If yes, please share the experience about how complex the interview was, etc. etc.
How To Servers For Malitnationl Bank?
How we calculate steam turbine governor linkage assembly?
what is the difference between oracle 8i vs 9i
why u r shifting from engineering to other field ?