Guest User

Untitled

a guest
Dec 15th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.59 KB | None | 0 0
  1. #include<stdio.h>
  2. #include <conio.h>
  3. #include <windows.h>
  4. #include <stdlib.h>
  5. int main()
  6. {
  7. char a[12][13];
  8. int i, j;
  9. printf("  SURPRISE !!\n"); system ("pause");
  10. HANDLE h = GetStdHandle ( STD_OUTPUT_HANDLE );
  11.   WORD wOldColorAttrs;
  12.   CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
  13. GetConsoleScreenBufferInfo(h, &csbiInfo);
  14.   wOldColorAttrs = csbiInfo.wAttributes;
  15.   SetConsoleTextAttribute ( h, FOREGROUND_RED | FOREGROUND_INTENSITY );
  16. for(i=0;i<5;i++)
  17.    for(j=0;j<5;j++)
  18.      {
  19.       if(i+j>5-1)  a[i][j]=3;
  20.       else a[i][j]=' ';
  21.       if(i+j==5-1) a[i][j]=3;
  22.      }
  23. for(i=5;i<12;i++)
  24.   for(j=0;j<6;j++)
  25.    {  if(i<j+5)a[i][j]=3;
  26.       else a[i][j]=' ';
  27.       if(i==j+5) a[i][j]=3;
  28.    }
  29. a[0][5]=' ';
  30. for(j=1;j<5;j++) a[j][5]=3;
  31. a[0][6]=a[1][6]=' ';
  32. for(j=2;j<12;j++) a[j][6]=3;
  33. a[0][7]=' ';
  34. for(j=1;j<11;j++) a[j][7]=3;
  35. for(i=0;i<12;i++)
  36.   for(j=0;j<6;j++) a[i][12-j]=a[i][j];
  37. a[4][4]='O'; a[4][5]='L'; a[4][6]='J'; a[4][7]='A';
  38. a[5][3]='R'; a[5][4]='A'; a[5][5]='D'; a[5][6]='O'; a[5][7]='V'; a[5][8]='I'; a[5][9]='C';
  39. for(i=0;i<12;i++)
  40.  { printf("\n");
  41.    for(j=0;j<13;j++) printf("%c",a[i][j]);
  42.  } printf("\n");
  43.   SetConsoleTextAttribute ( h, wOldColorAttrs);
  44. printf("\n");
  45.    SetConsoleTextAttribute ( h,  FOREGROUND_BLUE| FOREGROUND_INTENSITY );
  46.    printf(" I sada kazi mi sta mislis :D hahahaha \n");
  47.  
  48.    SetConsoleTextAttribute ( h, wOldColorAttrs);
  49.    SetConsoleTextAttribute ( h,  FOREGROUND_RED| FOREGROUND_INTENSITY );
  50.    printf("\n");printf("I kako ? ... Je li ti se svigao  ?? :D \n");
  51.    SetConsoleTextAttribute ( h, wOldColorAttrs);
  52.    system ("pause");
  53. return 0;
  54. }
Add Comment
Please, Sign In to add comment