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
consiteunts of indian railways
1. Design a counter which counts 0, 4, 8, 2, 6, and repeats using: 1.a using JK flip flops 1.b using T flip flops 1.c using D flip flops 2. Modify your design in question 1.a so that the circuit works according to the following function table X Y F 0 0 Clear 0 1 No Change 1 0 Parallel Loading 1 1 Count 3. Design a circuit that detects the pattern 010 in a serial input X considering: 3.a Overlapping 3.b No overlapping
A code which had some declarations of some data items. There were a couple of normal data items(char,int..) and some pointers as well and a malloc call. You have to find the total memory taken up in the stack(Hint:Pointers and all are allocated in heap, not in stack, so dont count them).Also in most of these questions, they were specifying that the OS was 32 bit
Explain work?
what is 16kHz use in GSM
What is the use of generics? when was it added to jdk?
PREVIOUS AND NEW companies positive and negative points AFTER LIVING
write a program for reverse a given string?
what is far pointer?
difference between w2k and win xp....
is the RKDF university is aicte approved for b.tech in computer
i have passed my gRaduation in BCA and now im looking for post graduation from Germany, i haver passed my ielts wth 6 band, nw plz tell me some question that wll ambessay ask
1.what a diffrenrs v-lan & (layer)l-3,l-2 bitween plz define defination of these? 2.how to configur ms outlook & lotus note (ibm)
I want to prepare for PSU's bt i dont know how many PSU's are open for computer science students and what is the competition level for these. So if anybody knows this please guide me through this.
what is defect tracking in sotware testing