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

  Code to sum of all the elements of the array

Write some code that places the sum of all the elements of the array x into total. Declare any variables that you need.

  Write program which models the employee

Write program which models the employee. An employee has an employee number, a name, an address, and a hire date. A name consists of a first name and a last name.

  Write program to read series of pairs of numbers

Write the program which reads series of pairs of numbers (product code and quantity sold) then the program must compute and print the total retail value

  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.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Write a full program to convert seconds into hours

Write a full program (starting from #include) that takes as input the number of seconds after midnight and displays the time in hours.

  Write a method that returns the value of base exponent

Write a method IntegerPower(base, exponent) that returns the value of base exponent For example, IntegerPower(3, 4) = 3 * 3 * 3 * 3.

  Write program to compute student-s quiz average

Write a program that will compute student's quiz average. Program must prompt the user for the number of quizzes and then ask the user for each quiz grade.

  Complete a request for system services

Objectives Complete a Request for System Services form, which triggers the preliminary investigation phase. Analyze a user interview and extract pertinent facts, which can be used to assess project feasibility. Complete a Problem Stateme..

  Design a math sorting game

Using Visual Studio 2010, design a math sorting game. A random number between 1 and 99 will be generated and displayed to the user. User will quickly have to divide that number by 3, and come up with remainder.

  Use a while loop to calculate terms of summation

Write function called estimate_pi that uses this formula to calculate and return estimate of π. It must use a while loop to calculate terms of summation until last term is smaller than 1e-15.

  Program that uses for loop prompt user to input two integers

Write a program that uses for loop to preform the following steps: Prompt the user to input two integers: firstnum and secondnum.

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