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
what size shaft is required to transmit 100 hp @1000 RPM ,if max shear stress is 10,000 PSI,angle of twist must be less than 1' /ft/shaft is made of steel.
How many codes are used when u design a Pressure Vessel
How can write a C program that shows All the prime number?
What are annotations? What are assertions? why they are used why not if-else?? what is normalization? what is QuickSort? what are Avl trees?
Can one be shocked holding a wire carrying a very large current with a low voltage source?
operation of carrier aided protection and what is the basis for choice of frequncy in powerline carrier system
who are egoless programmers?
5. Can you work well under deadlines or pressure?
Explain the following program segment. f(){ int *b; *b=2; }
how can i implement a program of polynomial adding,multiplication,through c language???
hi my name is ashok i have 55 per and 2 backlogs and one year left may i get above 60 pr
C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER
I want to make my career in networking so how to going there? right now i have done a+ n+ ccna course from cms com institute but i m not certified with globle certification os what is my frist step ?, my finincial prob also with me plz sorry isubmit it
today apptitude questions
performance test required for a automatic bank teller?