#include "stdafx.h" #include <iostream> using namespace std; void Summa(double& a, double& b) { double c; c=a+b; cout<<c<<endl; } void Summa(int& a, int& b) { int c; c=a+b; cout<<c<<endl; } int _tmain(int argc, _TCHAR* argv[]) { double a=20.3005,b=11.71; int a1=3, b2=5; Summa(a,b); Summa(a1,b2); system("pause"); return 0; }
Вывод программы