Skip to content

Commit

Permalink
Cpp._Fizz_Buzz_Application
Browse files Browse the repository at this point in the history
Uploaded a C++ application code which is most asked question on interview purpose in cpp.
  • Loading branch information
Nitish-web-nik authored Oct 27, 2020
1 parent b8faeb7 commit 38c9a9a
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 38c9a9a

Please sign in to comment.