1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
int element(string Name, double Number, int Group, int Period, string Charge, string Formula, double Mass,double& Neutrons)
{int x,y;
cout<<"Group no:";
cin>>x;
cout<<"Period no:";
cin>>y;
if ((x == 1) && (y == 1) )
{
Name ="hydrogen";
Number = 1;
Group = 1;
Period = 1;
Formula = "H";
Charge = "1+";
Mass = 1.01;
Table (Name, Number, Group, Period, Formula, Charge, Mass, Neutrons );
else if ((x ==s ) ||( y==s )||(x <=0 ) ||( y<=0 )||(x > 18 ) ||( y> 4 ))
{
cout<< "Unrecognized command.\n";
element(Name,Number,Group,Period,Charge,Formula,Mass,Neutrons);
}
else if(cont==N)
{menu();}
return cont;}
|