Notes
Notes - notes.io |
Author: Luciana Di Campli
Course: RVD 1231
Date: 02/07/2023
Assignment: Calories Assignment
Instructor: Sergio Pisano
Description: My second Java program that takes inputs of age, weight, heart rate and time, and outputs the amount of calories burned.
*/
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int ageYears;
int weightPounds;
int heartrateMinutes;
int timeMinutes;
double calories;
ageYears = scnr.nextInt();
weightPounds = scnr.nextInt();
heartrateMinutes = scnr.nextInt();
timeMinutes = scnr.nextInt();
calories = ((ageYears * 0.2757) + (weightPounds* 0.03295) + (heartrateMinutes * 1.0781 - 75.4991)) * timeMinutes / (8.368);
System.out.print("Calories: ");
System.out.printf("%.2f", calories);
System.out.println(" calories");
}
}
/* Code output in Eclipse
49 155 148 60
Calories: 736.21
*/
/*
Author: Luciana Di Campli
Course: RVD 1231
Date: 02/07/2023
Assignment: house real estate summary Assignment
Instructor: Sergio Pisano
Description: My Real Estate Java program.
*/
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int currentPrice;
int lastMonthsPrice;
int change;
currentPrice = scnr.nextInt();
lastMonthsPrice = scnr.nextInt();
change = currentPrice - lastMonthsPrice;
System.out.print("This house is $" + currentPrice + ".");
System.out.println(" The change is $" + change + " since last month.");
System.out.println("The estimated monthly mortgage is $" + (currentPrice * 0.051) / 12 + ".");
}
}
/*
Author: Luciana Di Campli
Course: RVD 1231
Date: 02/07/2023
Assignment: Divide input integers
Instructor: Sergio Pisano
Description:This program divides input integers
*/
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int userNum;
int divNum;
int first;
int second;
int last;
userNum = scnr.nextInt();
divNum = scnr.nextInt();
first = userNum/divNum;
second = first/divNum;
last = second/divNum;
System.out.print(first);
System.out.print(" "+second+" ");
System.out.println(last);
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
