Message from C, C++ discussions

December 2019

— Guys help plz

— 

Https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice
You can refer to this for the topic.

— What should scanf "A"; do in your opinion, and how should it be compiled?

— Http://www.cplusplus.com/reference/cstdio/scanf/
Check this for how to use scanf function.

— 👍

— #include <stdio.h>

//Compiler version gcc 6.3.0

int main()
{
int i, sum=0,A,B;
printf ("input A : ");
scanf ("%d",&A);
printf ("input B : ");
scanf ("%d",&B);
printf("Numbers between A and B, divisible by 3 : \n");
for(i=A;i<B;i++)
{
if(i%3==0)
{
printf("%d",i);
printf(" ");
}
}
}

Message permanent page

— WanzOr Have a look at this and try understanding it

— Thank you

— Very much

— One modification—-> for(i=A;i<=B;i++)
Not i<B

— Purge complete.

— OMG