Problem in codeblocks

#include <stdio.h>
int main()
{
int no1,no2,add,sub,mult,div,rem;
printf(“Enter two integers”);
scanf("%d",&no1);
scanf("%d",&no2);
add=(no1+no2);
sub=(no1-no2);
mult=(no1*no2);
div=(no1/no2);
rem=(no1%no2);
printf(“Addition is %d\n”,add);
printf(“subtraction is %d\n”,sub);
printf(“multiplication is %d\n”,mult);
printf(“Division is %d\n”,div);
printf(“Remainder is %d\n”,rem);

}I have wrote this program in codeblocks but I can’t Insert a integers,It shows only “Enter two numbers”, Can anyone explain how to correct this ?It seems to be a seetings problem.

Works well for me…Capture

division doesn’t work well cos you used integers
other than that the program looks fine…

2 Likes

Simple Tip : You don’t need to have two scanf statements.

scanf("%d %d", &no1, &no1);

Also, you need to convert type int to type float when you are using division, unless setting the floor or ceiling numbers.

Other Than that program worked well for me.:star_struck: