Mistři v programování na #hovnokod


Anonymous,

#include <stdio.h>

int main()
{
int c,d,b,g,r,k,x;
scanf("%d", &c);
x=1;
b=c;
g=0;
r=0;
d=0;
k=0;
c=16-c;
if(c>=1 && c<15 && c%2!=0){
for(c; c<=15; c++){
	g++;
	r++;
    x++;
	while(d<g){
		printf("*");
	d++;}
		while(r<b){
		printf("-");
		r++;
		}
		printf("\n");
		d=0;
		r=0;
		b--;
}
b=g-1;
g=1;
d=0;
for(k; k<c; k++){
while(r<b){
		printf("*");
		r++;
		}
	while(d<g){
		if(b>=1){
		printf("-");
	d++;}
	}
		printf("\n");
		r=0;
		d=0;
		b--;	
		g++;
}
}
else
	printf("cislo nie je z daneho intervalu\n");
getch();
return 0;
}

Anonymous,

Zas nějaký takyprogramátor.

 // Init (for tests start out side of actual source code (sector 0...4) => Sector 5,6 and 7)
   Akt_Sektor    = 5;
        if (Akt_Sektor == 0) Update.SW.Ptr = (unsigned long*) 0x08000000;
   else if (Akt_Sektor == 1) Update.SW.Ptr = (unsigned long*) 0x08004000;
   else if (Akt_Sektor == 2) Update.SW.Ptr = (unsigned long*) 0x08008000;
   else if (Akt_Sektor == 3) Update.SW.Ptr = (unsigned long*) 0x0800C000;
   else if (Akt_Sektor == 4) Update.SW.Ptr = (unsigned long*) 0x08010000;
   else if (Akt_Sektor == 5) Update.SW.Ptr = (unsigned long*) 0x08020000;
   else if (Akt_Sektor == 6) Update.SW.Ptr = (unsigned long*) 0x08040000;
   else                      Update.SW.Ptr = (unsigned long*) 0x08060000;

   // Unlock Flash
   (*FLASH).KEYR = 0x45670123;
   (*FLASH).KEYR = 0xCDEF89AB;

   // Wait for the BSY bit to be cleared
   while ( ((*FLASH).SR & (0x01 << 16)) == (0x01 << 16) )
         { __NOP; }

Anonymous,

char hex2bin(char hex) {
  if(hex == 0x00) return 0;
  if(hex == 0x01) return 1;
  if(hex == 0x02) return 2;
  if(hex == 0x03) return 3;
  ...
  if(hex == 0xfe) return 254;
  if(hex == 0xff) return 255;
  return 0; // other number
}

Anonymous,


Petr Balzer,