I want to create a shape like this:
ccccccc
cccccc
ccccc
cccc
ccc
cc
c
My code is:
#include <iostream>
using namespace std;
int main(){
int i, j;
for(i = 0; i < 7; i++){
for(j = 7; j > 7; j--){
cout << 'c';
}
cout << endl;
}
return 0;
}
But in terminal the output I get is some blank lines.
What am I doing wrong?
h contains circle() function which draws a circle with center at (x, y) and given radius. Syntax : circle(x, y, radius); where, (x, y) is center of the circle. 'radius' is the Radius of the circle.
for(j = 7; j > 7; j--){
This expression is always false.
You need to write for(j = 7; j > i; j--){
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With