printing multiple figures side by side - Page 2
 CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Thread: printing multiple figures side by side

1. Member
Join Date
May 2017
Posts
99

## Re: printing multiple figures side by side

The problem is that instructors are so strict on material covered only . if I use something new from else where I will get a 0 because the problem said for loop and use Technics u learned in this chapter which are only simple for loop skills for beginners u see ?
Last edited by david16; June 19th, 2017 at 04:22 PM.

2. ## Re: printing multiple figures side by side

So have you covered the ? ternary operator?

You should be learning how to code the c++ way

3. Member
Join Date
May 2017
Posts
99

## Re: printing multiple figures side by side

NO I didnt . I only covered few topic till now . And I will have to use them to solve this problem

4. Member
Join Date
May 2017
Posts
99

## Re: printing multiple figures side by side

hello there its me again . I did update my code a bit . remember I want the figure to be displayed side by side . I made 2 of them by actually replacing the other sides of the triangle which form a rectangle by spaces still having 2 can you help ?? this is my code

Code:
``` #include < iostream >
using namespace std;

int main ()
{

for ( int i = 1 ; i <= 10 ; ++i ) {

for ( int j = 1 ; j <= 10 ; j++ ) {

if ( j <= i ){

cout << "*";
}

else {

cout << " ";
}
}

for ( int j = 1 ; j <= 10 ; j++ ) {

if ( j >= i ) {

cout << "*";
}

else {

cout << " ";
}
}

cout << endl;

}
int k , l ;

for (  k = 1 ; k <= 10 ; k++ ) {

for ( l = k ; l < 10 ; l++ ) {

cout << " ";

}

for ( l = 1 ; l <= k ; l++ ) {

cout << "*";

}

cout << endl;

}

cout << "\n";

int i , j;

for (  i = 1 ; i <= 10 ; i++ ) {

for ( j = 1 ; j < i ; j++ ) {

cout << " ";

}

for ( j = i ; j <= 10 ; ++j ) {

cout << "*";
}

cout << endl;

}
system ("pause");
return 0;

}```
thx for ur help

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•