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
import java.util.Scanner; | |
import static java.lang.System.out; | |
public class QuarterlySalesSatistics2 | |
{ | |
public static void enterSalesFigures(double [][] companyInfo) | |
{ | |
Scanner keyboard = new Scanner(System.in); | |
for(int divisionIndex = 0; divisionIndex < companyInfo.length; divisionIndex++) | |
{ |
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
//first way | |
//decimal to binary | |
String binaryString = Integer.toBinaryString(number); | |
System.out.println("decimal to binary: " + binaryString); | |
//decimal to octal | |
String octalString = Integer.toOctalString(number); | |
System.out.println("decimal to octal: " + octalString); | |
//decimal to hexadecimal |
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
/** | |
* | |
* Java program to convert Hexadecimal to binary, decimal and Octal in Java. | |
* Hexadecimal is base 16, Decimal number is base 10, Octal is base 8 | |
* and Binary is base 2 number which has just two numbers 0 and 1. | |
* @author | |
*/ | |
public class ConvertHexaToDecimal { | |
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
//Write a program that reads three whole numbers and displays the average of the three numbers. | |
import java.util.Scanner; | |
public class ProjectOne { | |
public static void main(String[] args){ | |
Scanner keyScan = new Scanner(System.in); | |
System.out.println("This program will take three whole numbers, " |
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
/* A software company sells a package that retails for $99. Quantity discounts are given according to the | |
* the following table: | |
* Quantity Discount | |
* 10-19 20% | |
* 20-49 30% | |
* 50-99 40% | |
* 100 or more 50% | |
* Write a program that asks the user to enter the number of packages purchased. The | |
* program should then display the amount of the discount (if any) and the total amount of the | |
* purchase after the discount. |
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
/* A software company sells a package that retails for $99. Quantity discounts are given according to the | |
* the following table: | |
* | |
* Quantity Discount | |
* 10-19 20% | |
* 20-49 30% | |
* 50-99 40% | |
* 100 or more 50% | |
* | |
* Write a program that asks the user to enter the number of packages purchased. The |
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
/* Write a program that computes the tax ad tip on a restaurant bill | |
* The program should ask the user to enter the charge for the meal. | |
* The tax should be 6.75 percent of the meal charge. The tip | |
* should be 15 percent of the total after adding the tax. Display | |
* the meal charge, tax amount, and the total bill on the screen. | |
*/ | |
import java.util.Scanner; | |
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
MSOpenTech/redis | |
https://github.com/MSOpenTech/redis/releases/tag/win-3.0.504 |
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
class Program | |
{ | |
static void Main(String[] args) | |
{ | |
string fileName = | |
System.Environment.GetEnvironmentVariable("OUTPUT_PATH"); | |
TextWriter tw = new StreamWriter(@fileName, true); | |
string res; | |
int _arr_size = 0; |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
class Solution { | |
static void Main(String[] args) { | |
int n = Convert.ToInt32(Console.ReadLine()); | |
string[] height_temp = Console.ReadLine().Split(' '); | |
int[] height = Array.ConvertAll(height_temp,Int32.Parse); |
NewerOlder