print out put like this form
1 2 3 4 5 6
3 5 7 9 11
8 12 16 20
Answer Posted / r@m$
#include<stdio.h>
void main(){
int x=0,y=0;
while(y<20){
for(x=0;x<6;x++){
y++;
printf("%d\t",y);
}
y-=5;
for(x=0;x<5;x++){
y+=2;
printf("%d\t",y);
}
y-=7;
for(x=0;x<4;x++){
y+=4;
printf("%d\t",y);
}
}
}
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
All technical questions
What is adt in c programming?
Explain what is the most efficient way to store flag values?
What is the use of f in c?
With the help of using classes, write a program to add two numbers.
What does the && operator do in a program code?
What is typedef?
What are the keywords in c?
When would you use a pointer to a function?
Can we use visual studio for c?
What happens if header file is included twice?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
What are header files why are they important?