NALLAMUTHU GOUNDER MAHALINGAM COLLEGE
POLLACHI-642001
N.DHIVYA
BSC COMPUTER SCIENCE(1st year)
10.Recharge plan
#include <iostream>
int main()
{
int
i,mobilenumber,pin;
for(i=1;i<30;i++)
{
std::cout<<"your phone validity is about to end 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:";
std::cin>>pin;
if(pin==2656)
{
std::cout<<"";
}
else
{
std::cout<<"enter your pin correctly\n";
}
if(networkplan=="airtelplan1"&&pin==2656)
{
std::cout<<"airtel\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"Gb=50\n";
std::cout<<"rupees=361\n";
std::cout<<"valdity=30 days\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"airtel recharged successfully\n";
}
else
if(networkplan=="airtelplan2" && pin==2656)
{
std::cout<<"airtel\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"Gb=15\n";
std::cout<<"rupees=181\n";
std::cout<<"validity=30\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"airtel recharged successfully\n";
}
else
if(networkplan=="jioplan1" && pin==2656)
{
std::cout<<"JIO\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"the data=2 gb per day\n";
std::cout<<"rupees=749\n";
std::cout<<"validity=72 days\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"jio recharged successfully\n";
}
else
if(networkplan=="jioplan2" && pin==2656)
{
std::cout<<"JIO\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"the data=1.5gb per day\n";
std::cout<<"rupees=299\n";
std::cout<<"validity=28 days";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"jio recharged successfully\n";
}
else
if(networkplan=="bsnlplan1" && pin==2656)
{
std::cout<<"BSNL\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"the data=1 gb per day\n";
std::cout<<"rupees=108\n";
std::cout<<"validity=60 days\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"BSNL recharged successfully\n";
}
else
if(networkplan=="bsnlplan2" && pin==2656)
{
std::cout<<"BSNL\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"the data=2 gb per day\n";
std::cout<<"rupees=197\n";
std::cout<<"validity=70 days\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"BSNL recharged successfully\n";
}
else
if(networkplan=="vodafoneplan1" && pin==2656)
{
std::cout<<"VODAFONE\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"the data=1.5 gb per day\n";
std::cout<<"rupees=859\n";
std::cout<<"validity=84 days\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"VODAFONE recharged successfully\n";
}
else
if(networkplan=="vodafoneplan2" && pin==2656)
{
std::cout<<"VODAFONE\n";
std::cout<<"recharge plan=airtel\n";
std::cout<<"the data=1.5 gb per day\n";
std::cout<<"rupees=579\n";
std::cout<<"validity=56 days\n";
std::cout<<"your mobile number\n";
std::cin>>mobilenumber;
std::cout<<"VODAFONE recharged successfully\n";
}
else
{
std::cout<<"choose some available plans";
}
return 0;
}
OUTPUT: