Skip to content

Instantly share code, notes, and snippets.

@ahmadali-jamali
Last active December 17, 2020 19:08
Show Gist options
  • Save ahmadali-jamali/63fa8e7fa4bb7dbdf7492bfb9aa822ce to your computer and use it in GitHub Desktop.
Save ahmadali-jamali/63fa8e7fa4bb7dbdf7492bfb9aa822ce to your computer and use it in GitHub Desktop.
Little program which say Happybithday in art by C++
#include <iostream>
// Little project which show one text art. 2019
using namespace std;
class H_B{
public:
void outside_schema_Method(){
for (int i=0; i<23; i++){
cout<<"*";
}
}
void inherent_schema_Method(){
for (int i=0; i<11; i++)
for (int j=0; j<20; j++){
if (j==0 && i!=5 && j!=5){
cout<<" +";
}
if (j==19 && i!=5 && j!=5){
cout<<"+"<<"\n";
}
else if (i==5 && j==5){
cout<<">>>>>/\\/\\/\\/\\/\\/\\/\\<<<<<\n";
cout<<"\n";
cout<<" Happy Birthday"<<"\n"<<" Dear Name"<<"\n";
cout<<"\n";
cout<<">>>>>\\/\\/\\/\\/\\/\\/\\/<<<<<\n";
break;
}
else if (j%2==0 && i!=5 && j!=5){
cout<<"*";
}
else if (j%2!=0 && i!=5 && j!=5){
cout<<"$";
}
}
}
};
int main() {
H_B object;
object.outside_schema_Method();
cout<<"\n";
object.inherent_schema_Method();
object.outside_schema_Method();
string End;
cin>>End;
return 0;
}
//Programmer Ahmadali Jamali 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment