I want to print a big letter (R) into a block. I've got the letter but how can I add a block ?
#include <iostream>
#include <string>
#include <cctype>
int main(){
for( int r = 0; r < 7; ++r ){
for(int c = 0; c<5;++c){
if ((c == 0) || (c == 4 && (r != 0 && r != 3)) || ((r == 0 || r == 3) && (c > 0 && c < 4))){
std::cout << "R" << "" ;
}
else{
std::cout << " ";
}
}
std::cout << std::endl;
}
return 0;
}
Expected:
Result:
Aucun commentaire:
Enregistrer un commentaire