/*Before seeing the code solution make sure that you have tried enough. Don’t copy- paste the whole code. Find out the logic. If you face any trouble, just inform me in comment.*/
#include<stdio.h>
main()
{
double n,i,j=0;
for(i=0;i<6;i++)
{
scanf("%lf",&n);
if(n>0)
{
j++;
}
}
printf("%.0lf valores positivos\n",j);
return 0;
}
//Happy_Coding
#include<stdio.h>
main()
{
double n,i,j=0;
for(i=0;i<6;i++)
{
scanf("%lf",&n);
if(n>0)
{
j++;
}
}
printf("%.0lf valores positivos\n",j);
return 0;
}
No comments:
Post a Comment