Text: |
ԲΠ= Ãîðáà÷åíêî Â.À.
Çàïèòàííÿ:// ÏÎÄÊËÞ×ÅÍÍÛÅ ÁÈÁËÈÎÒÅÊÈ
#include <iostream> // ÁÈÁËÈÎÒÅÊÀ ÂÂÎÄÀ/ÂÛÂÎÄÀ
#include <math.h> // ÁÈÁËÈÎÒÅÊÀ  ÊÎÒÎÐÎÉ ÍÀÕÎÄßÒÜÑß ÌÀÒÅÌÀÒÈ×ÅÑÊÈÅ ÔÓÍÊÖÈÈ
#include <stdio.h> // ÁÈËÈÎÒÅÊÀ ÂÂÎÄÀ/ÂÛÂÎÄÀ
using namespace std; // ÒÀÊ ÍÀÄÎ äëÿ cout è äëÿ cin
//------------------------------------------------------------------------------
int main()
{
// ïðîãðàììó êîòîðàÿ ïðîñèò ïîëüçîâàòåëÿ ââåñòè 2 ÷èñëà â äâå ïåðåìåííûå
// ïîñëå ÷åãî ïðîãðàììà ïîìåíÿåò ìåñòàìè çíà÷åíèÿ ïåðåìåííûõ ñ ïîìîùüþ
// äîïîëíèòåëüíîé ïåðåìåííîé
double a,b,c;
// a, b - áóäåì ââîäèòü
// c - èñïîëüçóåòñÿ äëÿ îáìåíà
cout<<" ENTER A : ";
cin>>a;
cout<<" ENTER B: ";
cin>>b;
cout<<" A = "<<a<< "\t"<<" B = "<<b<<endl;
// îáìåí çíà÷åíèé ïåðåìåííûõ A è B ÷åðåç C
c = a;
a = b;
b = c;
cout<<endl<<" AFTER VAR CHANGE..."<<endl;
cout<<" A = "<<a<< "\t"<<" B = "<<b<<endl;
system("pause");
return 0;
}
====================================
|