Answer to Question #7351 in C++ for Virginia Carrillo
Write a C program to output a triangle of asterisks with five rows.
1
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment