R
rh75691
Hey guys,
I just need some help here, I kept on redoing this but still no luck.
I need to code an inverted pyramid:
******
****
**
*
Ok so you must be thinking that this is from my class. YES IT IS! And
you must be thinking that teaching me would defeat the purpose of
learning! YUP!
However, I want to let you know that this pyramid is killing me and I
need to pass it tomorrow. I have coded it already, but it doesn't
work. I just kept redoing it over and over.
I just need some guidance please. Please share me what you learned and
guide me.
#include<iostream>
#include<conio.h>
using namespace std;
main() {
for(int x = 18; x <= 1; x-=5) {
for(int y = 0; y <= x/3; y++) {
cout<<" ";
for(int z = 1; z<= x/3; z++) {
cout<<"*";
}
}
}
getch();
}
Thanks!
I just need some help here, I kept on redoing this but still no luck.
I need to code an inverted pyramid:
******
****
**
*
Ok so you must be thinking that this is from my class. YES IT IS! And
you must be thinking that teaching me would defeat the purpose of
learning! YUP!
However, I want to let you know that this pyramid is killing me and I
need to pass it tomorrow. I have coded it already, but it doesn't
work. I just kept redoing it over and over.
I just need some guidance please. Please share me what you learned and
guide me.
#include<iostream>
#include<conio.h>
using namespace std;
main() {
for(int x = 18; x <= 1; x-=5) {
for(int y = 0; y <= x/3; y++) {
cout<<" ";
for(int z = 1; z<= x/3; z++) {
cout<<"*";
}
}
}
getch();
}
Thanks!