HELP PLEASE

I have an assignment for my subject can you give me the code of this.!

**********
*********
********
*******
******
*****
****
***
**
*

when you run that.!
This site is not a homework service. You need to try it yourself, show us your attempt, and then we will help you work through it
uhm sorry but i dont know the format code to do that.....? please help me!
What C++ language constructs are you familiar with? (if, else, for, while, do, i/o-streams, etc)
yes.!

my teacher say using for loop but i dont know to how to start it... :'(
Last edited on
closed account (1vRz3TCk)
Have you not got a book or other resource to go with your class?
no :'(

always discussion :'(
Last edited on
closed account (1vRz3TCk)
book mark: http://www.cplusplus.com/doc/tutorial

For loops can be found here:
http://www.cplusplus.com/doc/tutorial/control/
you have yahoo messanger..?
closed account (1vRz3TCk)
No ... nor any other IM.
Paupau, you should look through the tutorial on this site; as CodeMonkey already pointed out. Direct contact via an IM is not necessary; if you need feedback you can just post here.
ok. that is the best forum for me..!

I couldn't help but notice that you haven't gotten any further. I'll give you a small example program that shows how to use for loops and how to use cout. I won't, however, give you the solution to your problem. You should be able to figure it out.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

using namespace std;

int main()
{
   cout << "This is the first line." << endl << "And this is the second." << endl;
   cout << "Let's count from 1 to 10!" << endl;
   for(int i = 1; i<=10; i++)
   {
      cout << i << endl;
   }
   return 0;
}

Which should display this:
This is the first line.
And this is the second.
Let's count from 1 to 10!
1
2
3
4
5
6
7
8
9
10

That's how to use for loops. Now try to solve the problem.
Topic archived. No new replies allowed.