Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 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.

1952


How many codes are used when u design a Pressure Vessel

1856


How can write a C program that shows All the prime number?

2076


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

2442


Can one be shocked holding a wire carrying a very large current with a low voltage source?

2047


operation of carrier aided protection and what is the basis for choice of frequncy in powerline carrier system

6425


who are egoless programmers?

2109


5. Can you work well under deadlines or pressure?

2699


Explain the following program segment. f(){ int *b; *b=2; }

2491


how can i implement a program of polynomial adding,multiplication,through c language???

1946


hi my name is ashok i have 55 per and 2 backlogs and one year left may i get above 60 pr

1816


C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER

5363


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

2009


today apptitude questions

1185


performance test required for a automatic bank teller?

2202