Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Please i need help in c++ for its my exam tomorrow!?

Its a triangle,

1

2 3

4 5 6

7 8 9 10

While programming, what are i,j,k here? How to we assign various loops in this program? ( i've basic knowledgeof loops).

Please help me. I'll give BA for sure.

Attachment image

1 Answer

Relevance
  • 5 years ago

    I can't see what is on the picture - please make better one. It is likely that i,j and k are variables that hold current status of the loop.

    for ( int i = 1; i < 10; i = i + 1 ) { cout << "value of i: " << a << endl; }

    for ( int j = 1; j < 10; j = j + 1 ) { cout << "value of j: " << a << endl; }

    for ( int k = 1; k < 10; k = k + 1 ) { cout << "value of k: " << a << endl; }

    three loops - one for each row of the figure.

Still have questions? Get your answers by asking now.