blob: e876c71efb004771d8ad09b7804ffec20c8f6f97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// 8aCode.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
using namespace std;
void readValues(int& a, int& b);
double divideValues(int a, int b);
int main()
{
int a, b;
double out;
readValues(a, b);
out = divideValues(a, b);
cout << "The double value of " << a << "/" << b << " is: " << out << ".";
}
void readValues(int& a, int& b)
{
cout << "Input the first int: ";
cin >> a;
cout << "\nInput the second int: ";
cin >> b;
cout << "\n\n";
return;
}
double divideValues(int a, int b)
{
double value;
value = (double)a / (double)b;
return value;
}
|