main()
{
    int s=0;
    while(a && b && c)
    {
        s++;
        a--;
        b--;
        c--;
    }
    printf("%d",s);
}

i know that here a,b,c are undeclared, but beside that i can't find the problem.
so anyone can help me out here.
thanks

Member Avatar for Rahul47

Two Problems:
1) You haven't provided header files. Atleast stdio.h
2) You haven't declared variables.

Otherwise worked fine for me.
2777039855db14d41749c869148bc73d

Not only do a, b, and c need to be declared, they also (in Rahul47's example) need to be initialized to non-zero values. So, in your case, that IS the problem! :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.