Skip to content

Commit

Permalink
Merge pull request #99 from Nitish-web-nik/master
Browse files Browse the repository at this point in the history
Cpp._Fizz_Buzz_Application
  • Loading branch information
Harshita-Kanal authored Nov 18, 2020
2 parents 5e41957 + 38c9a9a commit 78572e3
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CPP._FIZZ_BUZZ_APPLICATION.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
for(int i = 1; i<= 100; i++)
{
bool myBool = false;
if(i %3 == 0)
{
cout<<"Fizz";
myBool = true;
}
if(i % 5 == 0)
{
cout<<"Buzz";
myBool = true;
}
if(!myBool)
{
cout<<i;
}
if(i < 100)
{
cout<<" ";
}
}
return 0;
}

0 comments on commit 78572e3

Please sign in to comment.