大一c语言问题,运用for循环,第一题

img

回答:

img

#include<iostream>
using namespace std;

int main(){        
    int temp =4;
    for(int i=0;i<6;i++){
        for(int j=0;j<6;j++){
            if(j>temp){
                cout<<"*";
            }
            else{
                cout<<" ";
            }
        }
        cout<<endl;
        temp--;
    } 
}

你要问哪个