Created
April 14, 2013 03:45
-
-
Save krisanalfa/5381357 to your computer and use it in GitHub Desktop.
Print love in c++ using two methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OMG NICEE, do you know how to make 6 roses using c++