Answers for "print max val c"

C
0

print max val c

//print max value
int currVal;
int maxNum;
scanf("%d", &currVal);
maxNum = currVal;

   while (currVal > 0)
  {
      if (currVal > maxNum) {
         maxNum = currVal;
      }
      scanf("%d", &currVal);
   }
printf("Max val: %d", maxNum);
Posted by: Guest on April-23-2021

Code answers related to "C"

Browse Popular Code Answers by Language