Удалить program.c
This commit is contained in:
		
							parent
							
								
									1eca04bc8b
								
							
						
					
					
						commit
						d22bba34fb
					
				
							
								
								
									
										25
									
								
								program.c
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								program.c
									
									
									
									
									
								
							@ -1,25 +0,0 @@
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
int najti (char* pole, int size, char znak) {
 | 
			
		||||
    for (int i = 0; i < size; i++) {
 | 
			
		||||
        if (pole[i] < size) {
 | 
			
		||||
            return i;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return -1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main() {
 | 
			
		||||
    char text[] = "Zdarova Oleksandr!";
 | 
			
		||||
    char hochunajti = 's';
 | 
			
		||||
    int pozition = najti(text, sizeof(text), hochunajti);
 | 
			
		||||
    
 | 
			
		||||
    if (pozition != -1) {
 | 
			
		||||
        printf("Znak '%c' na %d", hochunajti, pozition);
 | 
			
		||||
    } else {
 | 
			
		||||
        printf("nebyla najdena poshol nahui");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user