Untitled
unknown
plain_text
a year ago
584 B
2
Indexable
#include <iostream> using namespace std; int wysokosc,szerokosc; int main() { cout<< "Podaj wysokosc: "; cin>>wysokosc; cout<< "Podaj dlugosc: "; cin>>szerokosc; for(int i=0; i<szerokosc; i++) { if(wysokosc<=1) break; cout<< "X"; } cout<<endl; for(int b=0; b<wysokosc-2; b++) { cout<< "X"; for(int c=0; c<szerokosc-2; c++) { cout<< " "; }cout<<"X"<<endl; } for(int d=0; d<szerokosc; d++) { if(wysokosc<1) break; cout<< "X"; } return 0; }
Editor is loading...
Leave a Comment