Skip to content

Instantly share code, notes, and snippets.

@andraantariksa
Created April 18, 2019 07:06
Show Gist options
  • Save andraantariksa/82807a3200451218c2b1a9d4bfefee5a to your computer and use it in GitHub Desktop.
Save andraantariksa/82807a3200451218c2b1a9d4bfefee5a to your computer and use it in GitHub Desktop.
#include <iostream>
int main(int argc, const char *argv[]){
float distance, fuel;
std::cout << "Distance traveled in mile:\n";
std::cin >> distance;
std::cout << "Fuel used in gallon:\n";
std::cin>> fuel;
std::cout << fuel / distance << " gallon/mile\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment