This file contains hidden or 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
| #include <iostream> | |
| #include <fstream> | |
| #include <string> | |
| void w(); | |
| void r(); | |
| using namespace std; | |
| int main() | |
| { |
This file contains hidden or 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
| #include <iostream> | |
| using namespace std; | |
| double prodSum(double a, double b); | |
| int main(int argc, char *argv[]) | |
| { | |
| cout << "enter value for x and y:\n" << endl; | |
| double x = 0; |
This file contains hidden or 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
| #include <iostream> | |
| using namespace std; | |
| int main(int argc, char *argv[]) | |
| { | |
| int homes[5]; | |
| for (int i = 0; i < 5; i++) { | |
| cin >> homes[i]; | |
| } |
This file contains hidden or 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
| #include <iostream> | |
| using namespace std; | |
| void fillArray(); | |
| int main(int argc, char *argv[]) | |
| { | |
| int homes[5]; | |
| int x = 10; |
This file contains hidden or 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
| #include <iostream> | |
| using namespace std; | |
| int main(int argc, char *argv[]) | |
| { | |
| cout << "there are " << argc << " arguments:" << endl; | |
| for (int narg = 0; narg < argc; narg++) { | |
| cout << narg << " " << argv[narg] << endl; | |
| } |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class Mileage { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| double miles; | |
| double gallons; | |
| double mileage; |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class PizzaCost { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| double size = 0.0; | |
| double cost = 0.0; |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class BirthdayGame { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| double birthday = 0.0; | |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class Average { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| int grade1 = 0; | |
| int grade2 = 0; |
This file contains hidden or 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
| import java.util.*; | |
| public class LabGrade | |
| { | |
| public static void main (String[] args) | |
| { | |
| int base; // the new base | |
| int base10Num; // the number in base 10 | |
| int maxNumber; // the maximum number that will fit | |