This commit is contained in:
2022-09-01 10:51:47 -05:00
parent 3099ec56e4
commit 2248cc8666
12 changed files with 182 additions and 7 deletions

Binary file not shown.

View File

@@ -0,0 +1,17 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.calebfontenot.lab4_calebfontenot;
/**
*
* @author caleb
*/
public class ABCD {
public static void main(String[] args)
{
int ABCD = 1234;
System.out.println(ABCD % 100);
}
}

View File

@@ -5,6 +5,8 @@
package com.calebfontenot.lab4_calebfontenot;
import java.util.Scanner;
/**
*
* @author caleb
@@ -12,13 +14,21 @@ package com.calebfontenot.lab4_calebfontenot;
public class Lab4_CalebFontenot {
public static void main(String[] args) {
int i = 11,
j = 22;
double x = 11.11,
y = 22.22;
// Setup Scanner;
Scanner input = new Scanner(System.in);
System.out.println("\n" + i + " + " + j + " = " + (i + j));
System.out.println("\n" + x + " + " + y + " = " + (x + y));
System.out.println("Enter i, j, x, and y: ");
int i = input.nextInt();
int j = input.nextInt();
double x = input.nextDouble();
double y = input.nextDouble();
//int i = 11,
// j = 22;
//double x = 11.11,
// y = 22.22;
// Changed addition to division
System.out.println("\n" + i + " / " + j + " = " + (i / j));
System.out.println("\n" + x + " / " + y + " = " + (x / y));
}
}