Can any anon help convert this small piece of code from C++ to C# please...
in particular I'm having trouble with the if statement in C# as intellisense states:
"Operator ! cannot be applied to operand of type int"
#include "iostream" // less than and greater than are disabled
int main(int argc, char** argv)
{
unsigned int sum = 0;
for(int i = 1; i < 1001; ++i)
if(!(i % 3) && !(i % 5))
sum += i;
std::cout << i;
return 0;
}
in particular I'm having trouble with the if statement in C# as intellisense states:
"Operator ! cannot be applied to operand of type int"
#include "iostream" // less than and greater than are disabled
int main(int argc, char** argv)
{
unsigned int sum = 0;
for(int i = 1; i < 1001; ++i)
if(!(i % 3) && !(i % 5))
sum += i;
std::cout << i;
return 0;
}
