Thread: Unknown Cause Small Program

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    4

    Unknown Cause Small Program

    Hello peeps, You guys gonna have to bare with me as I am new to programing.

    My algorithms professor gave us an assignment develop a program in C wich will take any integer and multiply it form 0 to 10. The problem is I only get the result in the command line prompt after I hit "ESC" and press "ENTER" I have no clue why, since I haven't messed at all with the debugger, can anybody shed some light?

    this is my code

    Code:
    #include <stdio.h>
    
    
    int main()
    {
        int x, multiply, result;
    
    
        printf("Multiply from 0 to 10:");
        scanf("%d\n", &x);
    
    
        for ( multiply = 0; multiply <= 10; multiply++ ) {
            
            result = x * multiply;
            printf("%d x %d = %d\n", x, multiply, result );
       
        }
        return 0;
    }
    Last edited by Marcos Curvello; 08-28-2012 at 08:58 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Polynomial program, Unknown Error.
    By protofarmer720 in forum C++ Programming
    Replies: 5
    Last Post: 06-14-2011, 01:24 AM
  2. Controlling an unknown program
    By bigdan43 in forum C++ Programming
    Replies: 3
    Last Post: 02-08-2005, 02:45 PM
  3. Unknown Errors in simple program
    By neandrake in forum C++ Programming
    Replies: 16
    Last Post: 04-06-2004, 02:57 PM
  4. A small problem with a small program
    By Wetling in forum C Programming
    Replies: 7
    Last Post: 03-25-2002, 09:45 PM
  5. Need help with a small program
    By DenisGFX in forum C Programming
    Replies: 4
    Last Post: 02-02-2002, 10:47 AM

Tags for this Thread