Thread: multiplication table help

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    12

    multiplication table help

    Hi its me again . I understand that in a loop function
    " for(int x=0;x<100;x++) " X increases by one as long as X is <100. But I wanna know what expression to use (ie. x++,x** if it x** even exists) if i wanna multiply a number by 1 and then multiply it by 2 then 3.......hehehe u get the point. THX for the help.

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    In order to make a multiplication table, you need a nested loop.

    Code:
    for (int i = 0; i < 10; i++) {
       for (int j = 0; j < 10; j++) {
          cout << i*j << " ";
       }
       cout << endl;
    }
    I don't know if that was your question though...
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    12
    Thanks you have been very helpful . I starting to get the hang of this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multiplication table
    By freddyvorhees in forum C++ Programming
    Replies: 6
    Last Post: 08-02-2008, 11:09 AM
  2. multiplication table without for loop
    By agomera in forum C Programming
    Replies: 3
    Last Post: 03-17-2008, 05:30 AM
  3. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  4. multiplication table
    By SpEkTrE in forum C Programming
    Replies: 2
    Last Post: 12-09-2003, 04:46 PM