Chcel som pre jednu slečnu spraviť programik ktory by po napisani jej mena vyhodil obrazok (srdiečko konkretne :-P ) ale vyskytlo sa par problemov a neviem kde je vada :-P zatial som sa dopracoval k tomuto :
Kód:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char m[10], a[10]="tatiana";
printf("Napis svoje meno: ");
scanf("%s", &m);
if (m=="a")
printf("\n""____________000000____________000000______________ ", m);
else
printf("\n""____________000000____________000000______________ ", m);
printf("\n""__________000000000000______000000000000__________ ", m);
printf("\n""______000000000000000000__000000000000000000______ ", m);
printf("\n""____00000000000000000000000000000000000000000_____ ", m);
printf("\n""___00000000000000___000000000___00000000000000____ ", m);
printf("\n""__000000000000000___000000000___000000000000000___ ", m);
printf("\n""_0000000000000000___000000000___0000000000000000__ ", m);
printf("\n""_0000000000000000___000000000___0000000000000000__ ", m);
printf("\n""_0000000000000000___000000000___0000000000000000__ ", m);
printf("\n""_0000000000___000000000000000000000___0000000000__ ", m);
printf("\n""__000000000___000000000000000000000___000000000___ ", m);
printf("\n""___000000000___0000000000000000000___000000000____ ", m);
printf("\n""_____000000000___000000000000000___000000000______ ", m);
printf("\n""_______00000000____00000000000____00000000________ ", m);
printf("\n""__________0000000_______________0000000___________ ", m);
printf("\n""_____________0000000000000000000000000____________ ", m);
printf("\n""_______________000000000000000000000______________ ", m);
printf("\n""__________________000000000000000_________________ ", m);
printf("\n""___________________000000000000___________________ ", m);
printf("\n""______________________000000______________________ ", m);
printf("\n""_______________________0000_______________________", m);
printf("\n\n\n");
system("PAUSE > nul");
return 0;
}
Viem ze tam je to if a else naopak ale ked zadam ten obrazok ku if tak mi pri else už vyhadzuje chybu .. .asi tam treba oznacit ze pod if patri cely ten obrazov so vsetkymi printf ale neviem jak na to. A pri if (m=="a") ma to ignoruje ze aj ked zadam to co je deklarovane ako "a" tak to proste skoci na else ... uvazovali sme ze by to mohlo mat nieco docienia so stisnutim enteru ale neviem :-P ... s Cčkom som začal tak pred tyždňom čiže som v tom lamka tak mi plz niekto pomožte :-P Dik moc