1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
void Skaityti (int & k, int & s, int & b, int & i, int & n);
void Spausdinti (int k, int s, int b, int i, int n);
const char Cmax = 100;
int main()
{
setlocale(LC_ALL, "Lithuanian");
int k; //gaunami kisenpinigiai
int s; //buteliuko sulciu kaina
int b; //buteliu supirkimo kaina
int i; //savaites diena
int n; //turimi pinigai
Skaityti (k, s, b, i, n);
Spausdinti (k, s, b, i, n);
return 0;
}
void Skaityti (int & k, int & s, int & b, int & i, int & n)
{
ifstream fd ("sultys.txt");
fd >> k >> s >> b >> i >> n;
}
void Spausdinti (int k, int s, int b, int i, int n)
{
ofstream fr ("sultysrez.txt");
/*cout << k << endl;
cout << s << endl;
cout << b << endl;
cout << n << endl;
cout << i << endl;*/
int kiekis; //isgertu sulciu kiekis
if (1 <= i <= 7)
{
cout << "true";
}
else
{
cout << "false";
}
cout << i;
for (int j=1; j < s; j++)
{
}
}
|