Declaring and initializing c variables

Assignment Help Basic Computer Science
Reference no: EM131921052

Declaring and Initializing C++ Variables

Summary

In this lab, you declare and initialize variables in a C++ program. The program, which is saved in a file named NewAge.cpp, calculates your age in the year 2050.

Instructions

  1. Declare an integer variable named myNewAge.
  2. Declare and initialize an integer variable named myCurrentAge. Initialize this variable with your current age.
  3. Declare and initialize an integer variable named currentYear. Initialize this variable with the value of the current year. Use four digits for the year.
  4. Execute the program by clicking the "Run Code" button at the bottom of the screen.

Sample program execution:

My Current Age is 29.

I will be 65 in 2050.

Reference no: EM131921052

Questions Cloud

Executive summary and description of a SME : To prepare your report, you should conduct your research using a variety of sources. Executive summary and description of a SME
Why mobile consumers can be an attractive market : Explain how the redistribution of income in the United States has affected marketing planning thus far-and its likely impact in the future.
Discuss the use of the three different buying processes : Describe the situations that would lead to the use of the three different buying processes for a particular product-lightweight bumpers for a pickup truck.
What is the flotation cost and marginal cost of capital : What is the flotation cost and Marginal Cost of Capital (MCC) for equity if the firm needs to raise $500 million of new equity?
Declaring and initializing c variables : In this lab, you declare and initialize variables in a C++ program. The program, which is saved in a file named NewAge.cpp, calculates your age in the year 2050
Compare outsourcing it cloud support with in-house it : Compare outsourcing IT cloud support with in-house IT support. Describe methods to migrate the organizational resources to a cloud environment.
Discuss the benefits of virtualization in cloud environment : Discuss the benefits of virtualization in a cloud environment.
Describe types of influence that different people might have : If a nonprofit hospital were planning to buy ex-pensive MRI scanning equipment (to detect tumors), who might be involved in the buying center?
Storage administrator in a mid-size consulting firm : You are a Storage Administrator in a mid-size consulting firm. You are tasked with creating multiple virtual machines that will fit on a physical server.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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