Created
October 19, 2011 07:57
-
-
Save jmcph4/1297711 to your computer and use it in GitHub Desktop.
QIP Set 1 - Bugs (Standard I/O)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <iostream> | |
| using namespace std; | |
| int main(void) | |
| { | |
| int input; | |
| cin>>input; | |
| int dividend = 7; | |
| int output = input % dividend; | |
| int nextMultiple; | |
| // If 7 goes into input without remainder | |
| if (output == 0) | |
| { | |
| // Print next multiple | |
| cout<<input + 7; | |
| cout<<"\n"; | |
| } | |
| else | |
| { | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment