Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design and develop a complete C++ program that creates and displaysthe \'Banner\

ID: 3617816 • Letter: D

Question

Design and develop a complete C++ program that creates and displaysthe 'Banner' outputfrom the project listed below utilizing a user defined FUNCTION,named 'BANNER'. Please leavecomments!

#include <iostream>
using namespace std;

void input()
{cout<<" Morgan State University Project1"<<endl;
cout<<" Funlola Ogunleye"<<endl;
cout<<" March 19th 2010"<<endl;
cout<<" COSC 230.001 "<<endl;
cout<<" This program builds a diamond dependingyour input "<<endl;
}


int main()

{int i,j,k,n;
input();
cout<<"How large is your diamond(odd number between 5 and19)? ";
cin>>n;
while(n<5||n>19||n%2==0)
    {cout<<"invalid entry ";
     cout<<"How large is your diamond(oddnumber between 5 and 19)? ";
     cin>>n;
     }
for(j=1;j<=n;j+=2)
{for(i=1;i<=(n-j)/2;i++)
     cout<<" ";
   for(k=1;k<=j;k++)
       cout<<"*";
   cout<<" ";
   }
for(j=n-1;j>=2;j-=2)           //1 less line on bottom
{for(i=1;i<=(n-j+1)/2;i++)
     cout<<" ";
   for(k=1;k<j;k++)
       cout<<"*";
cout<<" ";
   }  
system("pause");
return 0;
}



Explanation / Answer

please rate - thanks hope this is what you need! #include using namespace std; void Banner(int n) {int i,j,k; for(j=1;j
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote