using nested loop that gives this outputs ?

Q5: : Build a program in C++ using nested loop that gives this outputs

(I)
*
**
***
****
*****

(II)
*****
****
***
**
*
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/195410/
closed account (48T7M4Gy)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>

int main()
{
    for(int i = 0; i < 1; i++)
   {
       std::cout << "(I)" << std::endl;
       std::cout << "*" << std::endl;
       std::cout << "**" << std::endl;
       std::cout << "***" << std::endl;
       std::cout << "****" << std::endl;
       std::cout << "*****" << std::endl << std::endl;
    }

    for( int j = 0; j < 1; j++)
    {
        std::cout << "(II)" << std::endl;
        std::cout << "*****" <<std::endl;
        std::cout << "****" << std::endl;
        std::cout << "***" << std::endl;
        std::cout << "**" << std::endl;
        std::cout << "* " << std::endl; 
     }

   return 0;
}



(I)
*
**
***
****
*****

(II)
*****
****
***
**
* 
 
Exit code: 0 (normal program termination)
closed account (48T7M4Gy)
No that's the best I can do, two separate loops without nests. They're too hard for me, have a go yourself and let me know, I'd really appreciate your help. :(
Sorry my assignment is at loop i need to complete please help
closed account (48T7M4Gy)
I'd help you but you haven't even shown any initiative and made even a small attempt.
Sir my language is Urdu. English is very difficult for me. My problem is : I want to show this program through nested loop. So please give me idea how do i create
closed account (48T7M4Gy)
میں نے اپنا ہوم ورک نہیں کرے گا
@kemort
What are you trying to say?
closed account (48T7M4Gy)
I said I will not do his homework in Urdu. I got reported. My life is now in ruins. I will have to freshen up my Bahasa Indonesia skills and move to Java.
Topic archived. No new replies allowed.