Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- int Yardcon(int sts) {
- return 220 * sts;
- }
- int agegate(int sts) {
- return 365 * sts;
- }
- double to_lightyears(double sts) {
- return 63240 * sts;
- }
- int main() {
- int furlongs = 0;
- int years = 0;
- int yards = 0;
- int days = 0;
- double lightyears = 0.0;
- std::cout << "User Data:" << std::endl;
- std::cout << " John Smith" << std::endl;
- std::cout << " JJSMYT@hotmai.com" << std::endl;
- std::cout << " " << std::endl;
- std::cout << "Please enter distance in furlongs: ";
- std::cin >> furlongs;
- yards = Yardcon(furlongs);
- std::cout << furlongs << " furlongs = ";
- std::cout << yards << " yards." << std::endl;
- std::cout << "How old are you?: ";
- std::cin >> years;
- days = agegate(years);
- std::cout << years << " years means you have been alive for! = ";
- std::cout << days << " Days!" << std::endl;
- std::cout << "Enter the distance between our Milky Way galaxy and the Andromeda galaxy in light years: ";
- std::cin >> lightyears;
- std::cout << " " << std::endl;
- lightyears = to_lightyears(lightyears);
- std::cout << "thats the equivalent of " << lightyears <<" astronomical units!" << std::endl;
- std::cout << "How fascinating!" << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement