Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
Created April 14, 2013 03:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisanalfa/5381357 to your computer and use it in GitHub Desktop.
Save krisanalfa/5381357 to your computer and use it in GitHub Desktop.
Print love in c++ using two methods
#include <cstdlib>
#include <iostream>
using namespace std;
void love(int baris) {
if (baris == 1) {
cout << ",d88b.d88b," << endl;
} else if (baris == 2) {
cout << "88888888888" << endl;
} else if (baris == 3) {
cout << "`Y Angel Y'" << endl;
} else if (baris == 4) {
cout << " `Y888Y'" << endl;
} else if (baris == 5) {
cout << " `Y'" << endl;
}
}
int main() {
cout << "Harder one" << endl;
cout << "===========" << endl;
for (int i = 1; i <= 5; i++) {
love(i);
}
cout << "===========" << endl;
// Simple Version
cout << endl << "Simple one" << endl;
int baris = 5;
cout << "===========" << endl;
for (int i = 1; i <= baris; i++) {
if (i == 1) {
cout << ",d88b.d88b," << endl;
} else if (i == 2) {
cout << "88888888888" << endl;
} else if (i == 3) {
cout << "`Y Angel Y'" << endl;
} else if (i == 4) {
cout << " `Y888Y'" << endl;
} else if (i == 5) {
cout << " `Y'" << endl;
}
}
cout << "===========" << endl;
}
@aimanhadii
Copy link

OMG NICEE, do you know how to make 6 roses using c++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment