c++ star pattern right triangle
#include <iostream>
using namespace std;
int star (int z, int y, int c){
for (z=1;z<=c;z++){
for (y=1;y<=2*z-1;y++){
cout << y;
}
cout << "\n";
}
return z;
}
int main(){
int z,y,c;
cout << "Input Row = ";cin>>c;
star(z,y,c);
}