+ 7

What is the output of this code?

#include <iostream> using namespace std; int main() { float a=15.0; float b=2.0; float c=a%b; cout<<c; return 0; } Options :- 1 - 1.0 2 - Syntax Error 3 - Runtime Error 4 - 1

17th Jan 2018, 6:08 AM
Rahul Hatwal
Rahul Hatwal - avatar
11 Answers
+ 12
syntax error
17th Jan 2018, 7:08 AM
Ankush Kumar
Ankush Kumar - avatar
+ 3
1
17th Jan 2018, 7:01 AM
Shtorma
Shtorma - avatar
+ 2
Shtorm'a нет так как % доступна лишь для int переменных
17th Jan 2018, 7:14 AM
Demid Metelnikov
Demid Metelnikov - avatar
+ 1
Syntax error, because operator "%" only for integer variables
17th Jan 2018, 7:17 AM
Demid Metelnikov
Demid Metelnikov - avatar
+ 1
#Demid Metelnikov It's Runtime Error not Syntax Error
17th Jan 2018, 7:19 AM
Rahul Hatwal
Rahul Hatwal - avatar
+ 1
Трудная штука. Awesome)
17th Jan 2018, 7:21 AM
Shtorma
Shtorma - avatar
+ 1
2
25th Jan 2018, 11:58 AM
Naman jain
0
Error
17th Jan 2018, 10:48 AM
Ghadafi Garba
Ghadafi Garba - avatar
0
1-1.0
17th Jan 2018, 12:58 PM
Diwakar Singh Rana
Diwakar Singh Rana - avatar
0
my answer is 1.0 that is right or wrong
17th Jan 2018, 12:59 PM
Diwakar Singh Rana
Diwakar Singh Rana - avatar
0
#Diwakar Singh Rana It's wrong Answer : Runtime Error
17th Jan 2018, 1:52 PM
Rahul Hatwal
Rahul Hatwal - avatar