Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by RyanK ( 5 years ago )
#include <iostream>
using namespace std;
int main()
{
int a,b;
for (b=1; b<=5; b++){
for (a=1; a<=4; a++){
if ((b==1 || b==3) && a<=3){
cout << "*";
}else if ((b==2 || b==5) && (a==1 || a==4)){
cout << "*";
}else if (b==4 && (a==1 || a==3)){
cout << "*";
}else{
cout << " ";
}
}
cout << endl;
}
cout << endl;
for (b=1; b<=5; b++){
for (a=1; a<=3; a++){
if ((b==1 || b==2) && (a==1 || a==3)){
cout << "*";
}else if (b==3){
cout << "*";
}else if ((b==4 || b==5) && a==2){
cout << "*";
}else{
cout << " ";
}
}
cout << endl;
}
cout << endl;
for (b=1; b<=5; b++){
for (a=1; a<=4; a++){
if (b==1 && (a==2 || a==3)){
cout << "*";
}else if (b==2 && (a==1 || a==4)){
cout << "*";
}else if (b==3){
cout << "*";
}else if ((b==4 || b==5) && (a==1 || a==4)){
cout << "*";
}else{
cout << " ";
}
}
cout << endl;
}
cout << endl;
for (b=1; b<=5; b++){
for (a=1; a<=4; a++){
if ((b==1 || b==4 || b==5) && (a==1 || a==4)){
cout << "*";
}else if (b==2 && (a==1 || a==2 || a==4)){
cout << "*";
}else if (b==3 && (a==1 || a==3 || a==4)){
cout << "*";
}else{
cout << " ";
}
}
cout << endl;
}
cout << endl;
for (b=1; b<=5; b++){
for (a=1; a<=4; a++){
if ((b==1 || b==5) && (a==1 || a==4)){
cout << "*";
}else if ((b==2 || b==4) && (a==1 || a==3)){
cout << "*";
}else if (b==3 && (a==1 || a==2)){
cout << "*";
}else{
cout << " ";
}
}
cout << endl;
}
cout << endl;
return 0;
}
Revise this Paste