Bool is a variable data type which can store either 1 or 0.
#include<iostream>
using namespace std;
int main()
{
bool j,k,m;
bool i = j = k = m = 0;
cout<<j<<endl<<i<<endl<<k<<endl<<m<<endl;
return 0;
}
//===============================================================================
#include<iostream>
using namespace std;
int main()
{
bool j,k,m;
bool i = j = k = m = 1;
cout<<j<<endl<<i<<endl<<k<<endl<<m<<endl;
return 0;
}
//===============================================================================
#include<iostream>
using namespace std;
int main()
{
bool j,k,m;
bool i = j = k = m = 0;
cout<<j<<endl<<i<<endl<<k<<endl<<m<<endl;
return 0;
}
//===============================================================================
#include<iostream>
using namespace std;
int main()
{
bool j,k,m;
bool i = j = k = m = 1;
cout<<j<<endl<<i<<endl<<k<<endl<<m<<endl;
return 0;
}
//===============================================================================
No comments:
Post a Comment