Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*------------------------------------------
- // X_es_kereszt
- // by -zolee-
- //
- // Egy x, egy kereszt, fo- es mellekatlo
- // megjelenitese a kepernyon.
- ------------------------------------------*/
- #include <stdio.h>
- #define SZELESSEG 21
- #define MAGASSAG 21
- void main(void){
- int i, j;
- printf("* karakter megjelenitese a\n"
- "11. sorban es a 11. oszlopban\n"
- "-----------------------------\n");
- for(i=1; i<MAGASSAG; i++){
- if(i == 11){
- printf("*********************");
- }else{
- for(j=1; j<SZELESSEG; j++){
- if(j == 11){
- printf("*");
- }else{
- printf(" ");
- }
- }
- }printf("\n");
- }
- printf("\n\n* karakter megjelenitese a foatloban\n"
- "------------------------------------\n");
- for(i=1; i<=MAGASSAG; i++){
- for(j=1; j<=SZELESSEG; j++){
- if(j==i){
- printf("*");
- }else{
- printf(" ");
- }
- }
- printf("\n");
- }
- printf("\n\n* karakter megjelenitese a mellekatloban\n"
- "----------------------------------------\n");
- for(i=1; i<=MAGASSAG; i++){
- for(j=1; j<=SZELESSEG; j++){
- if(j==22-i){
- printf("*");
- }else{
- printf(" ");
- }
- }
- printf("\n");
- }
- printf("\n\n* karakter megjelenitese a fo es mellekatloban\n"
- "----------------------------------------------\n");
- for(i=1; i<=MAGASSAG; i++){
- for(j=1; j<=SZELESSEG; j++){
- if(j == 22 - i || j == i){
- printf("*");
- }else{
- printf(" ");
- }
- }
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement