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

  News article regarding denial of service attack

Research via the internet and find recent news article regarding denial of service attack, or distributed denial of service attack.Summarize the article using at least 500 words.The key to this assignment is to demonstrate your understanding of th..

  Different types of cloud deployments

Describe the different types of cloud deployments and what services each provides.

  Examine the performance of this program as a function of k

Examine the performance of this program as a function of k.

  Is-lm-fx model with floating exchange rates

Suppose in an economy, there is an exogenous fall in export demand for home goods. Answer the following questions using the IS-LM-FX model.

  Array and then the sum total of the values

Prompt the user to enter 10 integers and fill a 1-dimensional array with these 10 integers. Add the integers stored in the array. Display the array and then the sum total of the values stored in the array.

  What is the result of the following command

Sometimes when writing code, we need to cast a data type to a different data type. For example, you might need to change an int to a double or vice versa.

  Governance mechanisms used in the modern corporation

What are the internal and external corporate governance mechanisms used in the modern corporation?

  Consider the new trends of mobile computing

Information technology professionals face many ethical obligations, conflicts, and dilemmas. Discuss ethical issues an IT professional might face. Consider the new trends of Mobile Computing, Social Media, and the Cloud.

  How much ram is installed on your computer?

How much RAM is installed on your computer?

  Change the footer to display your name instead of adam smith

Create a column chart to show the graphical representation of the expenses, using the figure below as a guide. Create the chart on its own chart sheet, named Expense Report Chart. Do not include a legend but include the title "Expenses." Include d..

  Calculate the mean square of the treatments

The P-value of this F-statistic turns out to be 0.0000949. What does this say about the null hypothesis of equal means?

  National institute of standards and technology

The National Institute of Standards and Technology (NIST) replaced the former NIST Special Publication 800-37, Guide for the Security Certification and Accreditation of Federal Information Systems with NIST Special Publication

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