Post: Java Math Solving Code
10-05-2014, 08:40 PM #1
primetime43
Knowledge is power Tiphat
(adsbygoogle = window.adsbygoogle || []).push({}); A little program I made for factoring in math. :p

    
import java.util.Scanner;


public class Factor
{
public static void main(String [] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("(x1 + y1)(x2 + y2)");

System.out.println("Please Enter x1");
int x1 = scan.nextInt();

System.out.println("Please Enter y1");
int y1 = scan.nextInt();

System.out.println("Please Enter x2");
int x2 = scan.nextInt();

System.out.println("Please Enter y2");
int y2 = scan.nextInt();

int solve = x1 * x2;
int solve1 = x1 * y2;
int solve2 = y1 * x2;
int solve3 = y1 * y2;

System.out.println(solve + solve1 + solve2 + solve3);
}
}


Program I made for raising numbers to powers :p

    
import java.util.Scanner;

public class test
{
public static void main(String [] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("Please choose a power:" + "\n1. 2nd Power" + "\n2. 3nd Power" + "\n3. 4nd Power");
int test = scan.nextInt();
if(test == 1)
{
System.out.println("Enter the number");
int num1 = scan.nextInt();
System.out.println(num1 * num1);
}
if(test == 2)
{
System.out.println("Enter the number");
int num2 = scan.nextInt();
System.out.println(num2 * num2 * num2);

}
if(test == 3)
{
System.out.println("Enter the number");
int num3 = scan.nextInt();
System.out.println(num3 * num3 * num3 * num3);

}
}
}
Last edited by primetime43 ; 10-05-2014 at 08:50 PM.
10-05-2014, 08:53 PM #2
primetime43
Knowledge is power Tiphat
Btw if you got any request for a certain math theorems or math equations, post them below and ill make a program for it. :p
10-05-2014, 09:30 PM #3
Default Avatar
Bch
Guest
Originally posted by primetime43 View Post
Btw if you got any request for a certain math theorems or math equations, post them below and ill make a program for it. :p


Hmm something to do with logarithms would be cool to see, I used to make program's to do my A Level maths homework for me, whilst learning computing, however I couldn't manage to do logarithms, so if your bored give that a go :P
10-05-2014, 10:56 PM #4
primetime43
Knowledge is power Tiphat
Originally posted by Beach View Post
Hmm something to do with logarithms would be cool to see, I used to make program's to do my A Level maths homework for me, whilst learning computing, however I couldn't manage to do logarithms, so if your bored give that a go :P


Right here mane. You must login or register to view this content.

The following user thanked primetime43 for this useful post:

10-06-2014, 12:19 AM #5
gamer89117
Can’t trickshot me!
lol make one that does integration by parts
good luck mate
10-06-2014, 01:43 AM #6
primetime43
Knowledge is power Tiphat
Originally posted by gamer89117 View Post
lol make one that does integration by parts
good luck mate


Ok I'll try it out. I'll post it on here and quote ya.
10-06-2014, 02:41 AM #7
primetime43
Knowledge is power Tiphat
Originally posted by gamer89117 View Post
lol make one that does integration by parts
good luck mate


idk mane, thats fuckin calc shit stare
10-06-2014, 09:36 PM #8
gamer89117
Can’t trickshot me!
Originally posted by primetime43 View Post
idk mane, thats fuckin calc shit stare

yah, i have to do that shit by hand
i hate calculous 2 with a passion

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo