ah
This commit is contained in:
		
							parent
							
								
									093ceb69e2
								
							
						
					
					
						commit
						31481381f3
					
				| @ -1,5 +1,7 @@ | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #include <ctype.h> | ||||
| #include <stdlib.h> | ||||
| 
 | ||||
| #define LINESIZE 100 | ||||
| #define LINE_SIZE 100 | ||||
| @ -10,10 +12,22 @@ struct pizza { | ||||
| }; | ||||
| 
 | ||||
| int main(){ | ||||
|     //struct pizza tuniakova;
 | ||||
|     struct pizza nulova; | ||||
|      struct pizza tuniakova = { | ||||
|         .name="Tuniakova", | ||||
|         .prize=2.3 | ||||
|     }; | ||||
|     int POCET_JEDAL=0; | ||||
|     // Nastavíme všetky bajty pamäte na nulu
 | ||||
|     // Alebo staticky priradime nejake hodnoty
 | ||||
|     memset(&tuniakova, 0,sizeof(struct pizza)); | ||||
|     // Pozor, táto inicializácia funguje iba na novších prekladačoch
 | ||||
|     struct pizza jedalny_listok[POCET_JEDAL]; | ||||
|     // Na začiatku celé pole vynulujeme, všetky pizze sú nulové
 | ||||
|      | ||||
|     memset(jedalny_listok, 0,sizeof(struct pizza)*POCET_JEDAL); | ||||
|      | ||||
|     struct pizza *prva = jedalny_listok; | ||||
|     struct pizza *druha = jedalny_listok + 1; | ||||
|     struct pizza *tretia = &jedalny_listok[2]; | ||||
| @ -31,24 +45,45 @@ int main(){ | ||||
|             printf("%s",line); | ||||
|         } | ||||
|     } | ||||
|     //float value = strtof(line);//line2
 | ||||
|     //if (value == 0.0F){
 | ||||
|       //  return 0;
 | ||||
|     //}
 | ||||
|     //item->prize = value;
 | ||||
|     //strcpy(item->name, line);
 | ||||
|     /*return 1;
 | ||||
|     struct pizza item; | ||||
|     int counter = 1; | ||||
|     while(read_pizza(stdin,&item)){ | ||||
|         counter += 1; | ||||
|         printf("%s",item->name); | ||||
|         printf("%.2f",item->prize); | ||||
|     }*/ | ||||
|     //printf("%s má cenu %.2f\n",item->name,item->prize);
 | ||||
|     char hacker_script(char c); | ||||
|     //char hacker_script(char c);
 | ||||
|     return 0; | ||||
| } | ||||
| char hacker_script(char c){ | ||||
|     } | ||||
|     char hacker_script(char c){ | ||||
|         char numbers[] = "0123456789"; | ||||
|         char letters[] = "oizeasbtbq"; | ||||
|         for (int i = 0; i < 10; i++){ | ||||
|             tolower(c); | ||||
|             if (c == numbers[i]){ | ||||
|                 return letters[i]; | ||||
|             } | ||||
|         } | ||||
| } | ||||
| //////////////////////
 | ||||
| //////////////////////
 | ||||
| //////////////////////
 | ||||
| //////////////////////
 | ||||
| //////////////////////
 | ||||
| //////////////////////
 | ||||
| //////////////////////
 | ||||
| //  //////////////////
 | ||||
|     } | ||||
| ////////////////////////
 | ||||
| //             /////////
 | ||||
| //    ////////    //////
 | ||||
| //    ////////    //////
 | ||||
| //    ////////    //////
 | ||||
| //    ////////    //////
 | ||||
| //    //       /////////
 | ||||
| //         /////////////
 | ||||
| //    ///    ///////////
 | ||||
| //    ////    //////////
 | ||||
| //    /////    /////////
 | ||||
| //    //////    ////////
 | ||||
| //    ///////    ///////
 | ||||
| ////////////////////////
 | ||||
							
								
								
									
										
											BIN
										
									
								
								cv1/program.exe
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								cv1/program.exe
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user