// Input validation (val1 > 0)
      printf("\nPlease enter the value of val1:\n");
      while(1){
        scanf("%d", &val1);
        if (val1 > 0) break;
      printf("\nPlease enter a greater than zero value:\n");
      }
      C language logo

      .btzvalidation

      0

      20

      avatar
      pZacca
      C code-speeding snippets

      This code prints "Insira o valor de %d", which is the value of the variable &USER_INPUT. It prints "Favor inserir um valor maior que zero.", which means that the user should input a value larger than zero.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.