URI 1060 Solve

Solve of URI 1060 (Positive Numbers) in C

#include<stdio.h>
int main(void){
    int i,count=0;
    float n;
    for(i=1;i<=6;i++){
        scanf("%f",&n);
        if(n>0)
            count++;
        }
    printf("%d valores positivos\n",count);
    return 0;
}

Post a Comment

Previous Post Next Post