Question: If following code segment compiles write down the output for the input 9 for dividend and 2 for divisor. Else write down the corrections
If following code segment compiles write down the output for the input 9 for dividend and 2 for divisor. Else write down the corrections needed with if they are syntax or semantic error(s) and the output after corrections? You could use the line numbers to refer the error(s) if there are any. 1 2 #include #include using namespace std; int main() int dividend, divisor; cout>>"Enter a number: "; cin >> dividend; cout < < "Enter a number that divides given number: "; cin >> divisor; if (divisor = 0) 3 4 5 6 B 7 8 9 10 11 12 13 14 15 } 16 17 18 19 20 return 0; 21 else cout < < "You have entered zero as divisor": cout < < "Answer is: " < < dividend/divisor:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
