LOOSE TECH - C Programming Blog Online
Showing posts with label
Table Of Any Number In C Language
.
Show all posts
Showing posts with label
Table Of Any Number In C Language
.
Show all posts
Sunday, 8 September 2013
How To Find Table Of Any Number In C Language
//Program to find Table of any number
1. #include
2. #include
3. void main() 4. { 5. int a,i; 6. clrscr(); 7. printf("Enter a number whose table you want to see\n\n"); 8. scanf("%d",&a); 9. for(i=1;i<=10;i++) 10. { 11. printf("\n%d * %d = %d\n",a,i,a*i); 12. } 13. getch(); 14. }
OUTPUT Enter a number whose table you want to see 11 11 * 1 = 11 11 * 2 = 22 11 * 3 = 33 11 * 4 = 44 11 * 5 = 55 11 * 6 = 66 11 * 7 = 77 11 * 8 = 88 11 * 9 = 99 11 * 10 = 110
Explanation:-
In this Program, we used some terms that are used in almost every program of C.
Let understand the meaning of these terms.
1.
int a,i;
a
→
Is a variable of Integer type used to store an integer constant.
i
→
Is a variable of Integer type used to store an integer constant.
n
→
Is a variable of Integer type used to store an integer constant.
Variable:-
An entity (it can be anything which exists in real world) that may vary during program execution is known as variable.
Variable names are the names given to locations in memory.
Older Posts
Home
Subscribe to:
Posts (Atom)