Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void){
- int N;
- int column;
- int row;
- printf("Negyszög #-bol es *-ból @ atloval\n");
- printf("Adja meg, a negyszog meretet: \n");
- scanf("%d", &N);
- for(row=0; row<=N; row++) {
- for (column=0; column<=N; column++) {
- if(column<row){
- printf(" # ");
- } else {
- if(column==row){
- printf(" @ ");
- }else{
- printf(" * ");
- }
- }
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment