Detection of positive number || do while loop || C programming
In this, we are going to see the do-while loop, the program is based on the do-while loop which basically detects positive numbers input by the user with the help of the C Programming language. 


#include <stdio.h>

int main()
{
    int num;
    int sum = 0;
    do
    {
        printf("Enter only non positive number ? Or else your positive number will be caught\n");
        scanf("%d", &num);
    } while (num <= 0);
    printf("Hey you entered positive number : %d We have detected it", num);
    return 0;
}

//..........Coded by ARADHANA MISHRA


#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post