Thursday, 19 July 2018

Grading of Steel

===========================================================================
                                CODING



#include<iostream.h>
#include<conio.h>
#include<math.h>

void main()
{
clrscr();
float a,b,g,h;
cout<<"\n Grading of Steel Metal:- \n Enter The hardness of the steel: ";
cin>>a;
cout<<"\n Enter Carbon content in steel: ";
cin>>b;
cout<<"\n Enter the Tensile Strength: ";
cin>>g;
if(a>=50 && b<=0.7 && g>=5600)
{cout<<"\n Your Steel has got GRADE 10!!!";}
else if(a>=50 && b<=0.7 && g<5600)
{cout<<"\n Your Steel has got GRADE 9!!";}
else if(a<50 && b<=0.7 && g>=5600)
{cout<<"\n Your Steel has got GRADE 8!";}
else if(a>=50 && b>0.7 && g>=5600)
{cout<<"\n Your Steel has got GRADE 7";}
else if(a>=50 && b>0.7 && g<5600 || a<50 && b<=0.7 && g<5600 || a<50 && b>0.7 && g>=5600)
{cout<<"\n Your Steel has got GRADE 6";}
else if(a<50 && b>0.7 && g<5600)
{cout<<"\n Your Steel has got GRADE 5";}
else
{cout<<"\n Your Steel has very low quality with grade less than 5";}
getch();
}

===========================================================================


                                OUTPUT


No comments:

Post a Comment