Answer:
/*
* Program to print traingle using asterisk.
*/
#include<iostream>
using namespace std;
//Function to print n asterisk in a row.
void printAsterisk(int n)
{
for(int i = 0;i<n;i++)
cout<<"*";
}
int main()
{
//Variable to store size of trianle
int size;
cout<<"Enter the size of triangle"<<endl;
cin>>size;
//print asterik in increasing order line by line.
for(int i =0; i<size;i++)
{
printAsterisk(i);
cout<<endl;
}
//print asterik in decresing order line by line.
for(int i =size-1; i>0;i--)
{
printAsterisk(i-1);
cout<<endl;
}
}
Output:
Enter the size of triangle
10
*
**
***
****
*****
******
*******
********
*********
********
*******
******
*****
****
***
**
*
Explanation:
Since no programming language is mentioned therefore answer is provided in C++.
The above program will use two for loops to print the triangle using asterisk.
The first loop will print the asterisk line by line with each line having one more asterisk than the previous one till the size of the triangle.
The second for loop will print the asterisk using same logic as above but in reverse order.
Final output of triangle will be obtained.
Answer:
keywords are important for searching for the exact term you are looking for by using the most specific word possible, and boolean operators can help you expand or restrict your search, such as searching for "people named bob AND people named george"
Answer:
scotus[8]
Explanation:
scotus[8] gives the last name because there are 9 elements stored in scotus array
If there are changes to the responsibilities in a career, the typical outcome will change.
<img src=/static/game/image/actions/go.svg alt=' + ugettext(play= button)= += '= style=width: 4%;> ) def noPermissionMessage():