+ 1

Tell me mistakes????

#include <iostream> using namespace std; int main() { int x; char a; int y; int z; int xay ; z=xay ; cin>>x ; cin>>a ; cin>>y ; if(a=+){cout<<"ANSWER IS :"<<endl<<z); } return 0; }

2nd Sep 2017, 6:27 AM
Akash Saini
Akash Saini - avatar
2 Antworten
+ 15
remove ")" after z... I don't think a=+ works.. (it should be a+= which would not work either) "If loop" tests a condition and enters loop if it is correct.. You are trying to do an analysis instead of testing condition.. As said by @Ipang.. your motive behind this code isn't clear..
2nd Sep 2017, 6:52 AM
Frost
Frost - avatar
+ 4
Describe your purpose for writing this code, it isn't clear what you want to achieve by this code.
2nd Sep 2017, 6:35 AM
Ipang