Как сделать это в Си ++
Нужно переделать эту программу в структуру.
Объясните пожалуйста, очень нужно.. .
// lab1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include
#include
#include
using namespace std;
int main(int argc, CHAR *argv[])
{
double k1, k2;
double tgfi;
double fi;
cout <<"input k1=";
cin >> k1;
cout << "input k2=";
cin >> k2;
if (k1*k2==-1.0)
{
//cout << "Proizvedenie = 0";
return 1;
}
tgfi = (k2-k1)/(1+k2*k1);
fi = atan(tgfi);
cout << "result: fi=" << fi;
getch();
return 0;
}