Given an IP address, network mask, and subnetwork mask, determine other information and implement it about the IP address such as:
i. The subnet address of this subnet.
ii. The broadcast address of this subnet.
iii. The range of host addresses for this subnet.
iv. The maximum number of subnets for this subnet mask.
v. The number of hosts for each subnet.
vi. The number of subnet bits.
vii. The number of this subnet.
Write a program that lists 30 employees' names, their jobs, and the store where they work using a two-dimensional array.
Largest Number in the List
Question : You are given space-separated integers as input. Write a program to print the maximum numbers among the given numbers?
Sample Input_1:
1 0 3 2 9 8
Sample Output_1:
9
Sample Input_2:
-1 -3 -4 0
Sample Output_2:
Input
Convert the following function to a phase representation F(t)=alpha + beta1*cos(omega*t)+beta2*sin(omega*t)
Ground Beef Value Calculator Different packages of ground beef have different percentages of fat and different costs per pound. Write a program that asks the user for: 1. The price per pound of package "A" 2. The percent lean in package "A" 3. The price per pound of package "B" 4. The percent lean in package "B" The program then calculates the cost per pound of lean (nonfat) beef for each package and writes out which is the best value. INPUT Enter Price per pound package A: 2.89 Percent lean package A: 85 Price per pound package B: 3.49 Percent lean package B: 93 OUTPUT Package A cost per pound of lean:3.4 Package B cost per pound of lean:3.75 Package A is the best value Assume that the two packages will not come out equal in value. Note: the output of the program above should be formatted to 2 decimal places using the method System.out.printf(). Note: Use if and switch Control statement Format of Answer 1. Code 2. Screenshot of codes in editor 3. Output
To give you more of a challenge with a number's digits, let's try counting how many of a certain digit is present on a given number.
Let's start coding!
Instructions:
by CodeChum Admin
Multiplying two numbers is a piece of cake, but how about multiplying three of them, either being a negative of positive number? With programming and proper code, these tasks are easy to handle.
We want to store the information of different vehicles. Create a class named Vehicle with two data member named mileage and price. Create its two subclasses
*Car with data members to store ownership cost, warranty (by years), seating capacity and fuel type (diesel or petrol).
*Bike with data members to store the number of cylinders, number of gears, cooling type(air, liquid or oil), wheel type(alloys or spokes) and fuel tank size(in inches)
Make another two subclasses Audi and Ford of Car, each having a data member to store the model type. Next, make two subclasses Bajaj and TVS, each having a data member to store the make-type.
Now, store and print the information of an Audi and a Ford car (i.e. model type, ownership cost, warranty, seating capacity, fuel type, mileage and price.) Do the same for a Bajaj and a TVS bike.
Create a program with comments that can record the name, gender, and grades of a student in a certain subject. The grades consist of 1st, 2nd, 3rd, and 4th quarters.
The program should be able to do the following:
• Add new student
• Set student grades
• Show all students w/ grades
• Show student grade remarks (PASS or FAILED), passing mark is >= 75
• Search student record
The program should use the following features:
• Array
• Class
• Specific Sorting Algorithm (Selection)
• Specific Searching Algorithm (Linear)