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 / manohar bharti
#include<stdioh>
#include<conio.h>
void main()
{
int i,j,k,r;
printf("Enter the no. of terms you want");
scanf("%d",&r);
for(i=100,j=1,k=0;k<r;i--,j++,k++)
{
printf("%d",i);
k++;
printf(",");
if(k<r)
{
printf("%d",j);
printf(",");
}
else
return;
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Please explain why you are suitable for the position that you have applied for?
dam,rivers,states capt,
Q1 Design a webpage for a hotel which displays all the information of the hotel such as rooms available, facilities, and packages along with rate list. Apply the different tags available to give it a good style.
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.
Prove that in a self-complementing code the sum of the weights must be 9?
what is the concept of c++ class
c# code, vb.net code language parity refers to what?
Write a program in āCā language that will perform the following operation on static stack. 1. push 2. pop 3. Display 4. Exit Create separate functions for each operation. The push() should accept one argument of structure type and will not return any thing. The pop() function will not receive any argument & return structure type value. The stack & top must be declare as external variable. Each element of stack 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
please send aptitude test papers for reference with answers
WAP in Java to print the format A B A B C D E D E
what is the difference between physical address and logical address?
can you provide me uniken pvt ltd. technical interview question and answer?
discuss the technique for implementing high performance computing
how you judge that your interview go good????
sir i have 4 year gap in engineering. i would complete my degree b.tech it in 2014. it will be may be in 2nd class.my hsc is also with 2nd class. i am week in programming. Then if i want highest package upto 5-6 lacs then what should i prepare myself as a good engineer to get this package???