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
| #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[]) | |
| { | |
| 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; | |
| 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> | |
| #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
| import java.util.Scanner; | |
| class Hello { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| final int QUARTER = 25; | |
| final int DIME = 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
| # shellcast | |
| # Main application file | |
| import sources | |
| import pywapi | |
| import string | |
| def main(): | |
| print("Welcome to shellcast.\n\nNote: If your zipcode begins with a 0, type the zipcode without the zero.\n") |
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 Replace { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| String word = "", newWord = ""; | |
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 Dice | |
| { | |
| public static void main (String[] args) | |
| { | |
| // Call the roll method | |
| rollDice(); | |
| } | |
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 Lottery | |
| { | |
| public static void main (String[] args) | |
| { | |
| // Create an ArrayList of integers to store the 6 random numbers | |
| ArrayList<Integer> numbers = getLotteryNumbers(); | |
| // Print the results |