Untitled

 avatar
unknown
java
2 years ago
1.8 kB
3
Indexable
#include <stdio.h>
#include <math.h>

#define DELTA 0.000005

int main(void) {

    /*int pH;
    scanf("%d", &pH);

    if (pH > 7){
        if (pH > 12){
            printf("Very alkaline");
        }else{
            printf("Alkaline");
        }
    }else {
        if (pH == 7){
            printf("Neutral");
        }else if (pH > 2){
            printf("Acidic");
        }else{
            printf("Very acidic");
        }
    }*/

    /*int lumens = -1, watts;

    printf("Input watts> ");
    scanf("%d", &watts);

    if (watts == 15){
        lumens = 125;
        printf("%d", lumens);
    }*/

    /*int lumens = -1, watts;

    printf("Input watts> ");
    scanf("%d", &watts);

    switch (watts){
        case 15:
            lumens = 125;
            printf("%d", lumens);
            break;
        case 25:
            lumens = 215;
            printf("%d", lumens);
            break;
        case 40:
            lumens = 500;
            printf("%d", lumens);
            break;
        case 60:
            lumens = 880;
            printf("%d", lumens);
            break;
        case 75:
            lumens = 1000;
            printf("%d", lumens);
            break;
        case 100:
            lumens = 1675;
            printf("%d", lumens);
            break;
        default:
            printf("Intet lys? %d", lumens);
    }*/

    /*double r, x, y, beregning;

    printf("Venligst indtast radius for cirkel og punktet x,y i format (r,x,y): ");
    scanf("%lf, %lf, %lf,", &r, &x, &y);

    beregning = sqrt(pow(x-0,2) + pow(y-0,2));
    printf("Vores beregning: %lf\n", beregning);

    if ((r-DELTA) > beregning){
        printf("Vi er inde i cirklen!");
    }else if ((r+DELTA) < beregning){
        printf("Vi er udenfor cirklen!");
    }else{
        printf("Vi er på cirklen!");
    }*/
}