I'm trying to solve this exercise. Write a program that print out the following, user will input the top number:
*****
****
***
**
*
i made a program similary to this , but user inputs the bottom number ,the output is like this:
*
**
***
****
*****
here is the code to this program
#include <cstdlib>
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int b;
cout<<"Introdu un integer";
cin>>b;
for (int i = 1; i <=b;i++)
{
for (int j = 1; j <= b; j++)
{
cout<<"*";
}
cout<<endl;
}
getch();
return 0;
}
so what i must edit to solve the first program?