0
Why this dont write any output?( basic C++ )
Int n, m; // it is like a affirmation that n is mutiple of 5 m = n%5; If( m = 0){ cout << "yes " << endl; } return 0;
3 Réponses
+ 11
//Run this code
#include <iostream>
using namespace std;
int main() {
// Why this dont write any output?( basic C++ )
int n,m;
// it is like a affirmation that n is mutiple of 5
int m = n%5;
if( m == 0){
cout << "yes " << endl;
}
return 0;
}
// output :- Yes
//🙄and IDK ☹️ why coming error
+ 7
The code has too many errors that's why it isn't giving output .
errors are not Int it's int . assign value to n . use if instead of If use == not =.
+ 6
Bcos variable n doesnt have any value assigned...
Either u can ask from user through a cin stmt or Directly give some value like n=20;
Also use == for comparison