Answer to Question #7351 in C++ for Virginia Carrillo

Question #7351
Write a C program to output a triangle of asterisks with five rows.
1
Expert's answer
2012-03-15T09:43:22-0400
// Triangle of asterisks.cpp : Defines the entry point for the console
application.
//

#include "stdafx.h"
#include "conio.h"
#include
<iostream>

using namespace std;

int _tmain(int argc,
_TCHAR* argv[])
{
cout<<" *\n";
cout<<" *
*\n";
cout<<" * * *\n";
cout<<" * * * *\n";
cout<<"*
* * * *\n";
getch();
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS