How can we do data validation in bloodshed dev c++, in a if else statement??
how can we implement data validation in the program given below,
data validation for category,
previous meter reading should be less than current meter reading.
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
//Title of the Program
cout<<"\t*********************************************************"<<endl;
cout<<"\t\tEXOTIC ELETRICITY SUPPLIES BILL CALCULATOR"<<endl;
cout<<"\t*********************************************************\n"<<endl;
//Enter the Choice
cout<<"Please enter 'D' for Domestic Customer or 'C' for Commercial Customer: "<<endl;
cin>>category;
cout<<"\n[Please use underscore for space (e.g. Rajesh_Chand)]"<<endl;
cout<<"\nPlease enter Client Name: "<<endl;
cin>>full_name;
cout<<"Please enter Client Address: "<<endl;
cin>>address;
cout<<"Please enter the Account Number: "<<endl;
cin>>acc_number;
cout<<"Please enter Period of Meter Reading (Date): "<<endl;
cin>>period_date;
cout<<"Please enter the Current Meter Reading: "<<endl;
cin>>current_mr;
cout<<"Please enter the Previous Meter Reading: "<<endl;
cin>>previous_mr;