t Format Tools Table Window Help Lab 6 [Compatibility Mode] Design Layout Refere
ID: 3734256 • Letter: T
Question
t Format Tools Table Window Help Lab 6 [Compatibility Mode] Design Layout References Mailings Review View No Spacing Head ab 6 (Chapter 4 Possible points: 100 Due Date: 03/26/2018 (Monday) by 11:59 AM on the blackboard. Late submission date with a penalty: 03/28/2018 (Wednesday) by 11:59 PM on the blackboard. Problem Statement Write a program that uses nested loops to draw this pattern: The files that you need to upload to the blackboard: 1. Algorithm 2. Flowchart 3. NestedL.oop-py The assignment will not be accepted after late submission date. Avoid Cheating words English (United States) 20Explanation / Answer
#include <iostream>
using namespace std;
int main()
{
int i;
char ch;
ch='#';
for(i=0;i<=5;i++)
{
if(i==0)
cout<<ch<<ch;
else
if(i==1)
{
cout<<" "<<ch<<" "<<ch;
}
else if(i==2)
cout<<" "<<ch<<" "<<" "<<ch;
else if(i==3)
cout<<" "<<ch<<" "<<" "<<" "<<ch;
else if(i==4)
cout<<" "<<ch<<" "<<" "<<" "<<" "<<ch;
else
cout<<" "<<ch<<" "<<" "<<" "<<" "<<" "<<ch;
}
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.