Advertisement
AntonioVillanueva

Graficos sencillo en c sin ncurses ;)

Nov 27th, 2019
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. void gotoxy( int y, int x )
  6. {
  7.     printf( "\033[%d;%df", x, y );
  8.  
  9. }
  10.  
  11. int main(void)
  12. {
  13.     for (int x=0;x<=80;x++){       
  14.         gotoxy( x,1 );    
  15.         printf( "*" );     
  16.     }
  17.    
  18.     for (int y=0;y<=24;y++){       
  19.         gotoxy( 1,y );    
  20.         printf( "*" );     
  21.        
  22.         gotoxy( 80,y );    
  23.         printf( "*" );         
  24.     }  
  25.    
  26.     for (int x=0;x<=80;x++){       
  27.         gotoxy( x,24 );    
  28.         printf( "*" );     
  29.     }  
  30.    
  31.     gotoxy (40,12);
  32.     printf ("HOLA");
  33.    
  34.  
  35.     return 0;
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement