Write a program to display the multiplication table for a given integer up to 10 using a 'for' loop?
-
-
Answer:
#include // This code multiplies all the numbers from 1 to 10 together. // If you just wanted a specific number, replace the outer for loop with (for example) i=5; . int main(){ int i, j; for(i=1;i<=10;i++){ for(j=1;j<=10;j++){ printf("%d x %d = %d\n", i, j, i * j); } printf("\n"); } return 0; } #include #include void main() { int a,no; clrscr(); printf("Enter a Number that is to be Multiplied\n"); scanf("%d", &no); for (a=1;a<=10;a++) { printf(%dx%d=%d\n", no,a,a*no); } }
community wiki at wiki.answers.com Visit the source
Related Q & A:
- How can I communicate Raspberry Pi and Arduino (in both ways) using a 10-15m distance wires?Best solution by Arduino
- How to write a program to monitor the temperature of CPU?Best solution by Stack Overflow
- Can I record a program/movie from a cable dvr to a DVD recorder?Best solution by Yahoo! Answers
- How to write a TV program proposal?
- What is the difference between a for loop, a do while loop and a do loop?Best solution by wiki.answers.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.