Results 1 to 2 of 2

Thread: Is there a way to do multiples in c++?

  1. #1

    Is there a way to do multiples in c++?

    is there a way to tell your C++ programs to only execute an equation if it is a multiple of the number that was input?

    basicaly unless the number is a multiple of 10 it would move on to a different equation
    Last edited by Jhonalid1; June 4th, 2012 at 07:55 PM.

  2. #2
    Code:
    if(theNumber % inputNumber == 0){
        execute(equation);
    } else {
        moveOn();
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012