NALLAMUTHU GOUNDER MAHALINGAM COLLEGE
POLLACHI-642001
R.Rasigapriya
Bsc Computer Science(Ist Year)
10.Recharge plan
#include <iostream>
int main()
{
int number,pin;
for(int
i=1;i<=30;i++)
{
std::cout<<"Your phone validity is going to expire in
"<<i<<" days"<<"\n";
std::cout<<"You have to recharge now\n";
}
std::string
networkplan;
std::cout<<"Enter your networkplan\n";
std::cin>>networkplan;
std::cout<<"Enter your pin number\n";
std::cin>>pin;
if(pin==1234)
{
std::cout<<"your pin is correct\n";
}
else
{
std::cout<<"your pin is incorrect \n ";
}
if(networkplan=="Airtel1"&&pin==1234)
{
std::cout<<"*********************************\n";
std::cout<<"Airtel\n";
std::cout<<"Recharge
plan\t"<<"Airtel"<<std::endl;
std::cout<<"The data\t"<<"2
GB"<<std::endl;
std::cout<<"Rupees\t\t"<<"361"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"*********************************\n";
}
else
if(networkplan=="Airtel2"&&pin==1234 )
{
std::cout<<"*********************************\n";
std::cout<<"Airtel\n";
std::cout<<"Recharge plan\t
"<<"Airtel"<<std::endl;
std::cout<<"The
data\t"<<"15GB"<<std::endl;
std::cout<<"Rupees\t"<<"181"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
if(networkplan=="jio1"&&pin==1234 )
{
std::cout<<"*********************************\n";
std::cout<<"Jio\n";
std::cout<<"Recharge
plan\t"<<"Jio"<<std::endl;
std::cout<<"The data\t"<<"3
GB"<<std::endl;
std::cout<<"Rupees\t\t"<<"348"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
if(networkplan=="jio2"&&pin==1234)
{
std::cout<<"*********************************\n";
std::cout<<"jio\n";
std::cout<<"Recharge
plan\t"<<"Jio"<<std::endl;
std::cout<<"The
data\t"<<"1.5"<<std::endl;
std::cout<<"Rupees\t"<<"299"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your
mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
if(networkplan=="vodafone1"&&pin==1234)
{
std::cout<<"*********************************\n";
std::cout<<" vodafone1\n";
std::cout<<"Recharge
plan\t"<<"vodafone"<<std::endl;
std::cout<<"The
data\t"<<"2GB"<<std::endl;
std::cout<<"Rupees\t\t"<<"849"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
if(networkplan=="vodafone2"&&pin==1234)
{
std::cout<<"*********************************\n";
std::cout<<" vodafone2\n";
std::cout<<"Recharge
plan\t"<<"vodafone"<<std::endl;
std::cout<<"The data\t"<<"2
GB"<<std::endl;
std::cout<<"Rupees\t\t"<<"349"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
if(networkplan=="bsnl1"&&pin==1234)
{
std::cout<<"*********************************\n";
std::cout<<"BSNL1\n";
std::cout<<"Recharge
plan\t"<<"BSNL"<<std::endl;
std::cout<<"The data\t"<<"1
GB"<<std::endl;
std::cout<<"Rupees\t\t"<<"108"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
if(networkplan=="bsnl2"&&pin==1234)
{
std::cout<<"********************************\n";
std::cout<<"BSNL2\n";
std::cout<<"Recharge
plan\t"<<"BSNL"<<std::endl;
std::cout<<"The data\t"<<"4"<<std::endl;
std::cout<<"Rupees\t\t"<<"197"<<std::endl;
std::cout<<"Validity 28 days"<<std::endl;
std::cout<<"Your mobile Number"<<std::endl;
std::cin>>number;
std::cout<<"Reacharged succesfully\n";
std::cout<<"********************************\n";
}
else
{
std::cout<<"You have other available
plan"<<std::endl;
}
return 0;
}
OUTPUT: