Skip to content

shivank86/fizzbuzz.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

/**

  • @author shivank86
  • @date 20/12/2018 */

include using namespace std; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { if(i%3==0) { cout<<"fizz ";

	}
	else if(i%5==0)
	{
		cout<<"buzz ";
	}
	else if (i%3==0 && i%5==0)
	{
		cout<<"fizzbuzz ";

	}
	else 
	{
		cout<<i<<" ";
	}
}
return 0;

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published