hii guys i really neeeeeeeeeed a heeeeeeeeelp in that:
Open the customers file in append mode.
b. Allow the administrator to enter the customer mobile number,name,data pack plan and the actual megabytes MBs of data consumed by the customer.
c. Write the entered data to the customers file.
d. Keep looping until the administrator enters (999) as the mobile number, to stop entering data and go back to the main menu.
its my code but i dont know how to make it looping ?
#include <iostream>
#include <fstream>
#include<string>
using namespace std;
int main()
{
ofstream customerfile("customes.txt", ios::in | ios::out | ios::app);
int mob,mb;
string name1,name2,type;
cout<<" please enter your mobile number: "<<endl;
cin>>mob;
cout<<" please enter your firist name: "<<endl;
cin>>name1;
cout<<" please enter your last name : "<<endl;
cin>>name2;
cout<<" please enter your pack type : "<<endl;
cin>>type;
cout<<" please enter how many MB's you have been consumed : "<<endl;
cin>>mb;