Advertisement
kiraventom

Untitled

Jan 17th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(){
  5.     int i; float a[26], min, max;
  6.     for (i = 0; i < 26; i++){
  7.         printf("Enter a%i: ", i+1);
  8.         scanf("%f", &a[i]);
  9.         if (i = 0) {min = a[i]; max = a[i];}
  10.         else {
  11.             if (a[i] < min){min = a[i];}
  12.             else if (a[i] > max){max = a[i];}
  13.         }
  14.     }
  15.     for (i = 0; i < 26; j++){
  16.         if (a[0] < 0){
  17.             for (i = 0; i < 26; i++){
  18.                 a[i] = a[i] * pow(max, 2);
  19.             }
  20.         }
  21.         else {
  22.             for (i = 0; i < 26; i++){
  23.                 a[i] = a[i] * pow(min, 2);
  24.             }
  25.         }
  26.     }
  27.     return(0);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement