this idea can’t totally change your life but can surely save your electricity bill

this idea can't totally change your life but can surely save your electricity bill

Advertisements

how to write a program to ask for passcode and store information in a file?(written in codeblocks)

#include<iostream>
#include<fstream>
#include<iomanip>
#include<stdlib.h>
using namespace std;

class calculation {
private:
float total,saving;

public:

calculation(){
total = 0;
}

void calmoney(float a,float b) {
total=total+a;
saving=total-b;
cout<<“your total:”<<total<<endl;
cout<<“your saving:”<<saving<<endl;
}

void write_to_file(){
ofstream file;
file.open(“calculation.txt”, ios::app); Continue reading “how to write a program to ask for passcode and store information in a file?(written in codeblocks)”