Регистрация
5 Ноя 2013
Сообщения
88
Репутация
0
Спасибо
0
Монет
0
Вот код. Как мне переменной "p" присвоить значение переменной "d", которая в функции?

#include
#include
using std::cin;
using std::cout;
using std::endl;
void G1()
{
int a, b, c, d;
cin >> a >> b >> c;
d = a + b + c;
cout << d << endl;
}
int main()
{
int p;
setlocale(LC_ALL, "Russian");
G1();
G1();
system("pause");
system("cls");
system("pause");
return 0;
}
 
Назад
Сверху