Write the program which reads two strings

Assignment Help Programming Languages
Reference no: EM1372420

Write a program that reads 2 strings, age (as a 4 bit binary number) followed by a first name from the keyboard then converts the age from binary to decimal and prints out the age in decimal followed by the first name in lower case letters.

You need to use keyboard.next(); method to read a word from the keyboard where this method returns a string. Need to know how to convert a char to an int. Use int n = (int) c - 48.

Reference no: EM1372420

Questions Cloud

Why cost and revenue curves simulation : Some businesses will examine either pricing structure and modify it in order to maximize revenue, either by raising or lowering price. Cost and Revenue Curves simulation and this week's readings could organization you have chosen lower prices to in..
What is the ratio of the electrostatic force : Three identical conducting spheres initially have following charges: sphere A, 5Q; sphere B, -7Q; and sphere C, 0. Spheres A and B is fixed in place, with a center-to-center separation that is much larger than the spheres.
Cultural viewpoint-cultural differences : Discuss how appreciating cultural diversity affects peoples' ability to communicate effectively in the context of a multinational corporation or an international nonprofit agency. Feel free to add your own experiences as well as quoting others.
What premium he pay and what will be his expected utility : Suppose he is offered fair insurance with a $3000 deductible. What premium will he pay and what will be his expected utility with insurance.
Write the program which reads two strings : Write the program which reads 2 strings, age (as a 4 bit binary number) followed by first name from keyboard then converts age from binary to decimal and prints out age in decimal.
What is velocity of the two objects after collision : A girl on a sled coasts down a hill. Her speed is 7.60 m/s when she reaches level ground at the bottom. The coefficient of kinetic friction between sled's runners and the hard, icy snow is 0.04, and the girl and sled together weigh 644N.
Analyze the impact on terms of trade : Japan primarily exports manufactured services, while importing raw materials such as food and oil. Analyze the impact on Japan's terms of trade of the following events:
Explain by how much does the carrier lengthen : A flight attendant pulls her 63N flight bag a distance of 308m along a level airport floor at a constant velocity. The force she exerts is 45N at an angle of 57° above horizontal. Find the work she does on flight bag.
What quantity of pizzas demanded soared : Quantity of pizzas demanded soared following week from 1 pie an hour to 100 pies an hour. What was price elasticity of demand for Domino's pizza.

Reviews

Write a Review

Programming Languages Questions & Answers

  User defined function to calculate average of three scores

A user defined function that will calculate and display the average of the 3 scores that remain after dropping the highest and lowest scores the performer received.

  Wilkerson-irwin algorithm to minimize mean tardiness

Write a program to implement the Wilkerson-Irwin algorithm to minimize mean tardiness.

  Define function that takes year as it-s input argument

Define and call a function fast_food_billions that takes the year as it's input argument and returns the prediction as it's result. Tell the user that entry of a year before 2005 will cause the program to stop.

  Program calculate average number of days employee are absent

Write a program that calculates the average number of days a company's employees are absent. The program should have the following functions: a function called main that asks the user for the number of employees.

  Write function that takes array of positive integers

Write a function that takes an array of positive integers and the size of the array, and returns the average (type float) of the values.

  Program to use next character to create and return operator

Convert the string of digits into an integer. Otherwise, use the next character to create and return an operator.

  Design program that stores information of products

You are asked to design a program that stores information of given products. Your program must be menu driven. The program menu must include the following options: Add product information (Ask user to input product id, name and price)

  Sketch program flowchart for program to compute average

Sketch a program flowchart for a program that will compute the average of five grades. Input five grades and output the aveage.

  Application to print the sum of cubes

Write down the application to print the sum of cubes. Prompt for and read two integer values and print sum of each value raised to third power.

  Use a two dimensional array to solve problem

Use a two dimensional array to solve the following problem. A company has four salespeople ( 1 to 4) who sell five different products ( 1 to 5).

  Create user friendly application-display name-button clicked

Create a user friendly application which can do the following: displays the name and address when button is clicked and permit user to choose a state, and when a user clicks a button.

  Write program to list all english-math and science teachers

Suppose that input consists of a file of teachers. You are told to write a program to list all English, math, and science teachers. Each teacher can teach only one subject.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd