UNIT 03 TEST 1. Identify syntax errors in the following program. After corrections, what output would you expect when you execute it? Please turn in a working version of this code so that we may check your corrections. int main void { float bigNumber = 0 int smallNumber = 0.0; cout << "Enter a big number << endl; cin >> bigNumber; cout << "Enter a small number" << endl; cin << smallNumber; int rem = bignumber % smallnumber; cout << "If you divide the big number by the small number\n"; cout << You have << rem << left over << endl; return 1.0; } # include <iostream> // this line was missing using namespace std; // this line was missing int main (void) // void in () { int bigNumber = 0; //bigNumber must be int, if used to solve for remainder, otherwise you will get decimal answer, not remainder. missing ; at the end int smallNumber = 0; //smallNumber is int so = 0. cout << "Enter a big number " << endl; // missing end quote after number and before <<. cin >> bigNumber; cout << "Enter a small number" << endl; cin >> smallNumber; // wrond arrows, suppose to be opposite (>>). int rem = bigNumber % smallNumber; // better if used Hungarian notation for rem. And use same names

This preview
has intentionally blurred sections.
Sign up to view the full version.