We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ec0bcf commit 2ebe8dfCopy full SHA for 2ebe8df
Day1/C++/day1_solve.cpp
@@ -0,0 +1,35 @@
1
+/*
2
+ * @author: Shubhendra Singh <shubehndras21@gmail.com>
3
+ * @github: https://github.com/shubhendra-20
4
+ * @date: 25/01/2019
5
+*/
6
+
7
8
+#include <iostream>
9
+using namespace std;
10
11
+int main() {
12
+ int i,n;
13
+ cin>>n;
14
+ for(i=1;i<=n;i++)
15
+ {
16
+ if(i%3==0 && i%5==0)
17
18
+ cout<<"FizzBuzz ";
19
+ continue;
20
+ }
21
+ if(i%3==0)
22
23
+ cout<<"Fizz ";
24
25
26
+ else if(i%5==0)
27
28
+ cout<<"Buzz ";
29
30
31
+ else
32
+ cout<<i<<" ";
33
34
+ return 0;
35
+}
0 commit comments