Friday, October 26, 2018

Uri 1060 solution in C | Positive Numbers

/*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

No comments:

Post a Comment