The keyboard and display on the screen

Assignment Help C/C++ Programming
Reference no: EM13890702

In visual studio 2015,

Write a C++  program that prompts the user to enter unsigned decimal integer, multiplies it by ten, then displays the result in binary. ("Binary" here means that the user communicates with the program in ones and zeros.)

Your main function should

a) declare a char array,

b) call the readLn function to read from the keyboard,

c) call a function to convert the input text string to an int,

d) multiply the int by ten,

e) call a function to convert the int to its corresponding decimal text string,

f) call writeStr to display the resulting decimal text string.

Use the readLn and writeStr functions to read from the keyboard and display on the screen. Your function to convert from a decimal text string to an int should be placed in a separate function. this problem cannot be solved by simply shifting bit patterns. Think carefully about the mathematical equivalence of shifting bit patterns left or right.

 

Reference no: EM13890702

Questions Cloud

Fed funds rate and the three month treasury narrowed : The Federal funds purchased & repurchase agreements of Washington Mutual Bank declined from 4.1% of assets to .09% of assets between 6/30/2007 and 6/30/2008. The difference between the Fed Funds rate and the three month treasury narrowed as investors..
Create a studentgrade class that includes two data members : Create a StudentGrade class that includes two data members: a student ID number and the student's score on a test. Both of these are integers. Include "get" and "set" member functions for each of the data members, plus a displayRecord method which ou..
Describe the health care system of canada : Technology in health care can be viewed both positively and negatively. Using cost, access, or the human aspect of health care, identify two advantages and two disadvantages of the increased use of technology in health care. Describe the health ca..
Financial crisis inquiry report : The authors of the Financial Crisis Inquiry Report were not concerned that from 1999 to 2008, the financial sector expended $2.7 billion in reported federal lobbying expenses; individuals and political action committees in the sector made more than $..
The keyboard and display on the screen : Use the readLn and writeStr functions to read from the keyboard and display on the screen. Your function to convert from a decimal text string to an int should be placed in a separate function. this problem cannot be solved by simply shifting bit pat..
Make financial sense-compact fluroscent lamps : Compact fluroscent lamps (CFLs) have become popular in recent years, but do they make financial sense? Suppose a typical 60-watt incandescent light bulb costs $.50 and lasts 1,000 hours. A Kilowatt-hour of electricity costs $.101, which is about nati..
How these roles influence the workforce : Briefly describe the three roles you chose, and provide a rationale for why they are important to a human services manager and how these roles influence the workforce
Banks would not fail simply from a lack of liquidity : According to the FCIC report; during the Financial Crisis of 207-2009 The Fed, acting as lender of last resort, ensured that banks would not fail simply from a lack of liquidity.
Minimum-variance portfolio of the two risky funds : A pension fund manager is considering three mutual funds. The first is a stock fund, the second is a long-term government and corporate bond fund, and the third is a T-bill money market fund that yields a sure rate of 5.5%. The probability distributi..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Local diner that allows customers to see the diner''s menu

Design a program to be used for a small local diner that allows customers to see the diner's menu and then make their meal selections using the program.The program will also calculate and print an itemized bill.

  The big picturethis assignment consists of two separate

the big picturethis assignment consists of two separate programming tasks.1. you will create a linked list module that

  Implement recursive algorithms using a stack

Show the difficulties of the added complexity and which of the two sorts is easier to implement nonrecursively? Why?

  Implement a program to find the position of a cannonball

Write a C++ program that calculates the position of a cannonball that is fired straight up in the air - Implement a program to find the position of a cannonball

  Problem related to permutation

Write a recursively function that generates all the permutations of a set of numbers. Use the STL set class for all set operations and the STL linked list class to store and manipulate each individual permutation. When creating a set containing li..

  Using the hotelroom class of programming problem

Using the HotelRoom class of Programming Problem 1 , Section 12.4 , write a program that uses an array Hotel [ ] of 200 HotelRoom pointers to store information about a set of hotel rooms . The program should ask the user to ent information about a ro..

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Optimization is to add a sorting algorithm

The second optimization is to add a sorting algorithm. Each time you add an item to the array (from disk or from keyboard), you call a function called SortMyArray(), which use the bubble sorting algorithm to sort the array in the ascending order, ..

  Research paper on arrays and use single dimension arrays

Create codes for the following problem/s. Compile, test run, and edit them if necessary. Include your original .cpp and related file(s) (if any) in a single folder. Compress (zip) the folder and submit the single zipped folder.

  Create a program that will input a group of floating point

Create a program that will input a group of floating point values, storing them as double values in an array. This array will then be sent to three functions.

  Only letters are affected

You are to write a ROT13 (for "rotate 13") decoder to translate a secret message from its encoded state to something readable. In a ROT13 code, 'a' is shifted 13 letters to 'n', 'B' to 'O', 'c' to 'p', 'D' to 'Q', ..., 'N' to 'A', 'o' to 'b', 'P' ..

  What are the advantages of using variables in a data type

A data type describes the format and size of a data item. However, it does not define the type of operation a data item needs to perform. Do you agree with this statement? Why or why not? What are the advantages of using variables in a data type?

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