I am trying to make a periodic table using 2d arrays
I WANT to make a program in which compiler gets input and user input the symbol of the element and the whole info of corresponding elements print out.
1st part of the program i had completed plz any one give me the logic to complete 2nd part using loop and 2d arrays..
plz help me out
its my semester project.
#include<iostream>
#include<stdlib.h>
void periodic();
void exit();
using namespace std;
void main ()
{
while(1)
{
int choice;
cout<<endl<<"Enter 1 For Periodic Table"<<endl;
cout<<"Enter 2 To Exit"<<endl;
cin>>choice;
switch (choice)
{
case 1:
periodic();
break;
case 2:
exit();
default:
cout<<endl<<"Invalid Choice"<<endl<<endl;
}
}
}
void periodic()
{
char a[][115]= {{" 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111"},
{" 0000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000"},
{" 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"},
{" HHLBBCNOFNNMASPSCAKCSTVCMFCNCZGGASBKRSYZNMTRRPACISSTIXCBLCPNPSEGTDHETYLHTWROIPAATPBPAPFRATPUNPACBCEFMNLRDSBHM"},
{" eie eagli lr aci rneoiunaeserrbr rbocuhdgdnnbe esaaerdmmudbyormbufa esrtugibiotnralha pummkfsmdorfbghst"},
{" 1479111112222233333444555565667777888889999111111111111111111111111111111111111222222222222222222222222222 "},
{" 024690347802589058125609350259046891368000011122233334444555566667778889999000001222233334444455556666 "},
{" 136835918713790145027935793581460257047890236721874377247890125 "},
{" HHLBBCNOFNSMASPSCAPCSTVCMICNCZGGASBKRSYZNMTRRPSCITATIXCBLCPNPSEGTDHETYLHTTROIPGMTLBPARFRATPUNPACBCEFMNLRDSBHM"},
{" yeieoaixleoalihuhroaciaharoioiaererruttiioeuhaianineoeaaaererauaeyorhtuaauhsrloeheiosarachrrelmueaieeoauueoae"},
{" dltrrrtyuodgulollgtlatnrnobcpnlrsloybrtrolctollddntldnernraoomrdrslbuttfnnemialraasltdadtooapuerrlnrnbwtbahsi"},
{" rihyobrgoninmisfooacnaaognakpclmeempiorcbyhhdlvmi iliositisdmaoobpmileentgniitdcldmoaoniirtnttrikismderhnbrst"},
{" ouilnooer ueicpurnsidndma lee iannitdnioibneiaeiu munniuhueyerpririuirtiasiuii ul untniuniaiuoiueftieleeiuiin"},
{" gmul ngni msnohri suiiiin tlr uniinoitunudenudrum ore umamomtiiiuoumubiultumun ri tii umiucunncmpoeulinruruue"},
{" e mi e n iino e imuuuue micuenuimimetimi m ni m n dihuunmsm miumuem mu yu hun m umtmiii irimeucfmgmmr"},
{" n u n e uu r u mmmms u m mu u niu u yu u yuimmi i um mn m m me m i uuu unn vmio i i"},
{" m mm u m e m m m uum m m m mmu u u m n mmm mii i ur u u"},
{" s mm i m m m i uu u md m m"},
{" u u mm m i "},
{" m m u "},
{" m "}};