Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication2.cpp : definisce il punto di ingresso dell'applicazione console.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <iomanip>
- using namespace std;
- //FUNCTION PROTOTYPE FOR convert
- double convert(double *);
- int main()
- {
- double measurement;
- cout<<"Enter a length in inches to be converted to centimeters: ";
- cin>>measurement;
- convert(&measurement);
- cout<<fixed<<setprecision(4);
- cout<<"\nValue in centimeters: "<<measurement<<endl;
- return 0;
- }
- //FUNCTION convert
- double convert(double *length)
- {
- cout << "length passata alla funzione " << length << endl;
- cout << "*length passata alla funzione " << *length << endl;
- return *length *= 2.54;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement