-
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.
Merge pull request #43 from jubach2020/main
Create Reto #0 - C++
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
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 |
---|---|---|
@@ -0,0 +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; | ||
} | ||
} | ||
} | ||
} |