68 253
Assignments Done
99%
Successfully Done
In November 2018

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

Question #7351
Write a C program to output a triangle of asterisks with five rows.
Expert's answer
// 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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions