CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 12:31:44 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=e82be0f370b09015411fbc34124734effa048926510f2036ad05ee261cc8605ca%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22RgYh55sXkXW6lvgQoS8BMbyM9XNsq43a%22%3B%7D; HttpOnly; Path=/
cf-ray: 98ce604efc881eef-BLR
clcclear% Filename: Rivera13p3% Jeremy Rivera% EGR 120-001% User i - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clc
- clear
- % Filename: Rivera13p3
- % Jeremy Rivera
- % EGR 120-001
- % User inputs the tank size, amount of gas in the tank, and miles per galon used.
- % The program calculates percentage in the tank, gas needed, and distance traversed
- % VARIABLE DECLARATION
- % tanksize (real) User inputs size of tank in gallons
- % gas_in_tank (real) User inputs the amount of gas already in the tank
- % gaspercent (real) User inputs the percentage of gas in terms of gas gauge
- % gasneeded (real) User inputs the amount of gas needed for the tank to be full
- % distance (real) User inputs distance desired to traverse
- % mpg (real) User inputs the amount of miles per gallon the car uses
- tanksize=input('The size of the tank is: ');
- gas_in_tank=input('The amount of gas in gallons currently in the tank: ');
- mpg=input('Amount of miles per galon the car uses: ');
- gaspercent=gas_in_tank/100;
- fprintf('The gas tank is %d percent full\n',gaspercent);
- gasneeded=gaspercent*tanksize;
- fprintf('The gas needed to fill out the tank in gallons is: %0.2f\n',gasneeded);
- distance=gasneeded*mpg;
- if distance<200
- fprintf('The tank needs more gas to traverse the distance in miles\n');
- else
- fprintf('The tank is properly filled up for travel\n');
- end
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐⭐⭐ P
JavaScript | 9 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 9 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 19 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ H
JavaScript | 20 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 29 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ J
JavaScript | 31 sec ago | 0.24 KB
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 37 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ 4
JavaScript | 41 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand