This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Vec2Test() { | |
using namespace sparky; | |
using namespace math; | |
std::cout << "Printing Vector 2 test cases" << std::endl; | |
//test functions | |
Vec2 vector(1.0f, 2.0f); | |
std::cout << "\"" << vector << "\" expected: Vec2(1 , 2)" << std::endl; | |
vector.add(Vec2(5.0f, 4.0f)); | |
std::cout << "\"" << vector << "\" expected: Vec2(6 , 6)" << std::endl; | |
vector.divide(Vec2(6.0f, 6.0f)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class myGradeCalc3{ | |
public static void main(String[] args){ | |
final int NUMBER_OF_STUDENTS = 10; | |
int[] grades = new int[NUMBER_OF_STUDENTS]; | |
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of "+NUMBER_OF_STUDENTS+" students."); | |
Scanner in = new Scanner(System.in); | |
//Enter the students grades |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class myGradeCalc2{ | |
public static void main(String[] args){ | |
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of 4 students."); | |
Scanner in = new Scanner(System.in); | |
System.out.println("Please Enter Grade 1:"); | |
int grade1 = in.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class myGradeCalc{ | |
public static void main(String[] args){ | |
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of 3 students."); | |
Scanner in = new Scanner(System.in); | |
System.out.println("Please Enter Grade 1:"); | |
int grade1 = in.nextInt(); |