C Programming |
Number Decrease to Zero Triangle Posted: 25 Jan 2014 10:07 AM PST Q. Write a C program to print the following number decrease to zero triangle pattern as: 0 101 21012 3210123 432101234 Ans. /*c program for number decrease triangle*/ #include<stdio.h> int main() { int num,r,c,sp; printf("Enter max number : "); scanf("%d", &num); for(r=0; r<=num; r++) { for(sp=r; sp<num; sp++) printf(" "); for(c=r; c>=0; c--) printf("%d",c); for(c=1; c<=r; c++) printf("%d",c); printf("\n"); } getch(); return 0; } /************************************************************ The output of above program would be: ************************************************************/
| ||
Posted: 25 Jan 2014 08:50 AM PST In last post we read about what is computer. From Abcus to modern computer timing is called to computer generation. Each computer generation have specific features, and these features are more advances then those computer goes to higher computer generation. There are five computer generation as:
We'll discuss each computer generation detailed in next post. | ||
Posted: 25 Jan 2014 09:21 AM PST In today's life, computer is essential part of human life. Computer is so powerful system that do the all type works and decrease the human life problem and increase effective, easy and reliable life. The word "computer" comes from counting i.e. we can divide word computer in 2 words: compute + er in other word we can say computer is a machine that can compute all countable thing. But only countable machine, is it computer? Absolutely not, because in modern era computer do almost all the stuff of world. "Computer is an automatic electronic apparatus for making calculations or controlling operations that are expressible in numerical or logical terms." in other word, we can say: "Computer is an electronic apparatus that takes data and instruction from user then as input, process them and give the accordingly result as output." Input -> Process -> Output The first apparatus that is makes for computing is named: "Abacus" It is made in Chaina. Abacus perform only addition and subtraction to do all the computing work. It was too interesting that is uses long time in human life, till the modern computer not comes. From Abacus to modern computer timing, we divided in five parts, that is called "Computer Generation." |
You are subscribed to email updates from C Programming To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Post a Comment