Quick actions

cmd+k|ctrl+k

Navigation

Languages

teste de fluxograma

Snippet info

Language

C

Visibility

public

Author

orlando0206

Created

2016-09-26T23:22:26Z

Updated

2016-10-03T12:41:14Z

#include <stdio.h>


int main(void) {
    float h;
    int n=0, atual;
    while (n<=0) {
        scanf("%d", &n);
    }
    h=1;
    atual=2;
    while (atual<=n)
    {
        h=h+1.0/atual;
        atual++;
    }
    
    printf("\n%f",h);
    return 0;
}
INFO