-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bc488c
commit 8df424f
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 25 additions & 1 deletion
26
Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/c++/jubach2020.cpp
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
|
||
#include <iostream> | ||
using namespace std; | ||
int main(void){ | ||
// Your code here! | ||
int a; | ||
int m3; | ||
int m5; | ||
int m35; | ||
|
||
for(a=0; a<=100; a++) { | ||
if(a%3==0) { | ||
if(a%5==0) { | ||
cout << "fizzbuzz" << endl; | ||
} else { | ||
cout << "fizz" << endl; | ||
} | ||
} else { | ||
if(a%5==0) { | ||
cout << "buzz" << endl; | ||
} else { | ||
cout << a << endl; | ||
} | ||
} | ||
} | ||
} |