63 209
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #4415 in C++ for Yuri

Question #4415
Program that display an inverted triangle using nested for loop.


Please use basic functions only.. thanks
Expert's answer
#include "stdafx.h"
#include "iostream"

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
int size;
int z;
cout<<"Input size of triangle plz:"<<endl;
cin>>size;
z = size;
while(size)
{
& for (int i=0; i<size; i++)
& {
& & cout<<"* ";
& }
& cout<<endl;
& size--;
& for (int p = size; p<z; p++) // from Ukraine with love :)
& {
& cout<<" ";
& }
}
system("pause");

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