Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
497 B
4
Indexable
Never
#include <unistd.h>
 void rush(int width,int height){
    int cursor_position_x;
    int cursor_position_y;
    cursor_position_y = 0;
    char star = '*';
    char newline = '\n';
 
    while (cursor_position_y < height){
         cursor_position_x = 0;
        while (cursor_position_x < width){
             write(1, &star, 1);
             cursor_position_x++;
        } 
        write(1, &newline, 1);
         cursor_position_y++;
    }
    
 }

int main() {

    rush(4, 5);
    return 0;
}