the question is :

enter an odd number (integer)

enter an even number (integer)

enter the same odd number (real)

enter the same even number (real)

so what i did so far..

Code:

#include <stdio.h>
int main()
{
int number1;
int number2;
int sum;
int product;
int difference;
int quotient;
float number3;
float number4;
float sum;
float product;
float difference;
float quotient;
printf( "Enter an odd number\n" );
scanf( "%d", &number1 );
printf( "Enter an even number\n" );
scanf( "%d", &number2 );
printf( "Enter the same odd number\n" );
scanf( "%f", &number3 );
printf( "Enter the same even number\n" );
scanf( "%f", &number4 );
sum = number1 + number2;
printf( "Sum of the integers is %d\n", sum );
product = number1 * number2;
printf( "Product of the integers is %d\n", product );
difference = number1 - number2;
printf( "Difference of the integers is %d\n", difference );
quotient = number1 / number2;
printf( "Quotient of the integers is %d\n", quotient );
sum = number3 + number4;
printf( "Sum of the real numbers is %f\n", sum );
product = number3 * number4;
printf( "Product of the real numbers is %f\n", product );
difference = number3 - number4;
printf( "Difference of the real numbers is %f\n", difference );
quotient = number3 / number4;
printf( "Quotient of the real numbers is %f\n", quotient );
return 0;
}

the error is because of the declaration of sum, product, difference, quotient

but if i get rid of int sum etc etc, or float sum etc etc that wouldnt give me the answer that i wanted, right? (one of the result for either integer or real would be zero)

or did i do wrong right from the beginning? xD

thanks