Untitled

 avatar
unknown
plain_text
2 years ago
668 B
3
Indexable
#include <fstream>
#include <iostream>
using namespace std;


//ostream &operator<< (ostream& out,const aboba &a) {
//   out << a.name << " " << a.surname;
//   return out;
//}

/*struct TACHKA {
    char cvet;
    int mosh;
    string marka;
    string model;
    int pos;
    float obiom;
    int probeg;
};*/

int func(int a, int b) 
{
    return a * a - 5 * b;
}

int main()
{
    
    ifstream file("baba.txt");
    ofstream res("res.txt");
    int a, b,k,f=0;
    file >> k;
    while (k != 0) {
        file >> a >> b;
        k--;
        f = func(a, b);
        res << f<<endl ;
        
    }
    
    
  

}
 

Editor is loading...