Aktualizovat „a1/program.c“
This commit is contained in:
		
							parent
							
								
									493dcbded2
								
							
						
					
					
						commit
						314c336ded
					
				
							
								
								
									
										14
									
								
								a1/program.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								a1/program.c
									
									
									
									
									
								
							| @ -4,11 +4,11 @@ | ||||
| int main() | ||||
| { | ||||
|     float x=0; | ||||
|     float value =0; | ||||
|     double value =0; | ||||
|     int count =0; | ||||
|     float arr[50]; | ||||
|     double arr[50]; | ||||
|   	scanf("%f",&x); | ||||
|     while(scanf("%f",&value)!=EOF){ | ||||
|     while(scanf("%lf",&value)!=EOF){ | ||||
|         if(isalpha(value)!=0){ | ||||
|             return 0; | ||||
|         } | ||||
| @ -20,10 +20,10 @@ int main() | ||||
|         value+=arr[i]*pow(x,count-1-i); | ||||
|     } | ||||
|    | ||||
|   	if(value>=40000){ | ||||
|     	value =((int)(value*100 - 0.5)/100.00); | ||||
|     } | ||||
|     printf("Vysledok je :%.2f\n",value); | ||||
|   	//if(value>=40000){
 | ||||
|     //	value =((int)(value*100 - 0.5)/100.00);
 | ||||
|    // }
 | ||||
|     printf("Vysledok je :%.2lf\n",value); | ||||
|      | ||||
| 
 | ||||
|     return 0; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user