this program is supposed to take in 2 numbers and then displays their product or sume, depending on what the user selects.
so check this code out please
Code:
#include <stdio.h>
int main()
{ int num, num2, check, output;
printf( "put in an integer by brother: " );
scanf( "%d", &num );
printf( "put in another and we either sum these two or multiply them soon:" );
scanf( "%d", &num2 );
printf( "do you want it multiplied or summed? if you want it to be multiplied type in 1, if you want to divide type 2: " );
scanf( "%d", check );
if ( check == 1, output = num * num2 )
printf( "%d", output);
else if ( check == 2, output = num + num2 )
printf( "%d", output);
else printf( "you musta done something wrong" );
return 0;
}
and by the way, what does a "bus error" usually imply if anthing at all? hmmm, time to search while I wait for help, but you can tell me something any book could so don't hesitate, I hope you tell me that is.