Advertisement
MikecIT

19-3

Jun 14th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.89 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #include <Windows.h>
  5.  
  6. int main()
  7. {
  8.     int x,y,i;
  9.     time_t vr;
  10.     struct tm vreme;
  11.     randomize();
  12.     do{
  13.     x=random(66);
  14.     }while(x==0);
  15.     do{
  16.     y=random(24);
  17.     }while(y==0);
  18.     gotoxy(x,y);
  19.     printf("%c",218);
  20.     for(i=1;i<=13;i++) printf("%c",196);
  21.     printf("%c",191);
  22.     gotoxy(x,y+1);
  23.     printf("%c",179);
  24.     for(i=1;i<=13;i++) printf(" ");
  25.     printf("%c",179);
  26.     gotoxy(x,y+2);
  27.     printf("%c",192);
  28.     for(i=1;i<=13;i++) printf("%c",196);
  29.     printf("%c",217);
  30.  
  31. while(1){
  32.     time(&vr);
  33.     vreme=*localtime(&vr);
  34.     gotoxy(x+1,y+1);
  35.     printf("             "); // brisanje reci
  36.     gotoxy(x+1,y+1);
  37.     printf("%d. %d. %d.",vreme.tm_mday,1+vreme.tm_mon,1900+vreme.tm_year);
  38.     Sleep(500);
  39.     gotoxy(x+1,y+1);
  40.     printf("PROGRAMIRANJE");
  41.     Sleep(500);
  42.  
  43. }
  44.     return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement