2) .cheak even and odd nmbr\\\
//Check even or odd number
#include<iostream>
using namespace std;
int main()
{ int a,b;
cin>>a;
if ( a%2==0 )
{cout<<" a is even nmber";
}
else cout <<"a is odd nmbr";
return 0;
}
//Check even or odd number
#include<iostream>
using namespace std;
int main()
{ int a,b;
cin>>a;
if ( a%2==0 )
{cout<<" a is even nmber";
}
else cout <<"a is odd nmbr";
return 0;
}
Comments
Post a Comment
If you have any doubt ,let me know