Skip to main content

operator values program in c++

#include<iostream>
using namespace std;
int main()
{
int i=0;
int j=1;
int k=5;
bool btype = true;
bool btype2 = false;
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = 100<7 && !(5>10) || !btype2 && (j==0);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = 11>5 && (j=9) || (i=4);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = 10<4 || (i=1) && (j=7);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = (i=100) || (j=0) && (k=12);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = (k=0) && (j=1) || (i=13);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = (k=1) && (btype2) || (j=2);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = (k=3) && (j=5) || (i=0) && (btype2=true);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = (j=8) || (k=9) && (i=1) || (btype2=false);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
btype = (k=0) && (j=5) || (i=0) && (btype2=true);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;
i = j = (k=5) && (11>5);
cout<<i<<'\t'<<j<<'\t'<<k<<'\t'<<btype<<'\t'<<btype2<<'\t'<<endl;

return 0;}


**************************************
output:

Comments

Popular posts from this blog

Weight conversion program using functions in c++

#include<iostream> using namespace std; int num(int n) { cout<<"num of chocolate:"; cin>>n; return n; } int ounce(int a) { cout<<"weight in ounce:"; cin>>a; return a; } int pound(int b) { cout<<"weight in pound:"; cin>>b; return b; } int main () { int n, a, b; char choice; cout<<"enter choice 'o' for ounce and 'p' for pounds:"; cin>>choice; int x, y, z; x = num(n); y = ounce(a); z = pound(b); if (choice == 'o') {cout<<"total weight in ounce:"<<x*y;} if (choice == 'p') {cout<<"total weight in pounds:"<<x*z;} return 0; } ************************** Output:

Area Calculation By ImageJ

  Area Calculation By ImageJ      Open the Software      File => Open       Zoom in the Image and select the straight line        Mark the small line on graph and go to analyse => set scale      Set known distance 01, unit cm and click ok       Go to free hand and cover the area you want to calculate       Then press (ctrl + m) repeat the process for 3 time       After that go to the result and summarize 

Activation Energy Calculation in Origon

  Activation Energy ·          Click on the curve, go to analysis, fitting, and linear fit ·          Note the slope and error ·          Then follow the Formula to find activation energy              Ea =  mRln(10)1000 m= slope, R= 8.6173*10 -5 eV/K , ln(10) = 2.303