Answers for "c++ star pattern right triangle"

C++
0

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);
}
Posted by: Guest on October-05-2021

Code answers related to "c++ star pattern right triangle"

Browse Popular Code Answers by Language