Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
C language error
Name: xsu Date: September 24, 2002 at 18:02:49 Pacific OS: CPU/Ram:
Comment:
What is wrong with my code? i keep getting the "Invalid operand to binary" on line "var1=var1-1;" please help me solve this. this is a very simple code...it's to count out the prime numbers... take a look and tell me what is wrong...thankz
#include #include int main(){int numofout;int var1, var2, var3, var4;int count1=3;int count2=3;printf("\n\t\tEnter the number of prime numbers\n\t\tyou wish to find (number > 3):");scanf("%i", &numofout);while(numofout 3! "); scanf("%i", &numofout);}printf("\n\n\t\t1 is the 1st prime number.\n\t\t2 is the 2nd prime number.\n\t\t3 is the 3rd prime number.\n");do{count1=count1+1; do { count2=count2+1; var1=count2; do { var1=var1-1; var2=count2 % var1; } while(var2!=0
Summary: Hello all, I have a problem trying to compile a C program and, as a newbie to C, I am confused! This program comes from a tutorial, "A quick introduction to the C language" by Jacob Navia (from the d...
Summary: Hello, I'm in high school and for junior year I plan to take both Programming basic and C language. whats the difference between the two? which id more useful? is one easier than the other? And what ...