Submitted Questions

  • Program to print all prime numbers btw 1 to 100

    C Program to print all prime numbers btw 1 to 100..pls explain the program: What is if(p)??{geshibot language="cpp"}#include #include int main() { int num,n,div,p; printf("Enter any number: "); scanf("%d", &num); for(n=2; n

    jbode

    • Mar 8th, 2017

    To answer the specific question, "if(p)" is the same thing as "if (p == 1)" or "if (p != 0)". The variable "p" is being used as a flag to indicate whether the current candidate number ("n") is prime ...

    Rajkumar Yonzan

    • Feb 24th, 2017

    // Wap to display all prime number from 1 to 100. //

    #include
    #include
    void main()
    {
    int i,j,n;
    for(n=1;n