1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Daniel [21]
1 year ago
5

Edit the following statement so it uses the constant named YEAR:

Computers and Technology
1 answer:
Alenkasestr [34]1 year ago
4 0

Using the knowledge in computational language in C++ it is possible to write a code that will calculate the age of someone through the difference of years.

<h3>Writing code in C++ has:</h3>

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>int main()</em>

<em>{</em>

<em>//Declare variables</em>

<em>int myCurrentAge=29;</em>

<em>int myNewAge;</em>

<em>const int YEAR = 2050; //Declare constant YEAR=2050</em>

<em>int currentYear=2014;</em>

<em>myNewAge=myCurrentAge+(YEAR-currentYear); //calculate new age</em>

<em>cout<<"My Current Age is "<<myCurrentAge<<endl;</em>

<em>cout<<"I will be "<<myNewAge<<" in "<<YEAR<<"."<<endl; //display values on console</em>

<em>return 0;</em>

<em>}</em>

See more about C++ at brainly.com/question/19705654

#SPJ1

You might be interested in
NAT ________. allows a firm to have more internal IP addresses provides some security both allows a firm to have more internal I
algol13

Answer:

NAT provides some security but allows a firm to have more internal IP addresses

Explanation:

NAT ( network address translation) this is a process where a  network system usually a firewall  assigns a public IP address to an internal computer used in a private network. it limits the number of public IP address a company operating a private network for its computer can have and this is very economical also limits the exposure of the company's private network of computers. the computers can access information within the private network using multiple IP addresses but it is safer to access external information using one public IP address

5 0
2 years ago
Write the following program in C++ to print:
Alenkinab [10]
1.
#include <iostream>#include <string>
using namespace std;
int main(){    string chars; // This is where we will put our @ signs and print them    for(int x=0;x < 5; x++){
        chars = chars + '@'; // This will concatenate an @ sign at the end of the variable        cout << chars << "\n";    }}

2.
#include <iostream>#include <string>
using namespace std;
int main(){    string name; // Our variable to store the name    cout << "What is your name? \n"; // Asks the user for their name    cin >> name;    cout << "\nWell, hello " << name << "!";}

3.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n"; // Asks for a number    cin >> number;    cout << "You entered " << number << "%!";}

4.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n";    cin >> number;
    int check = number % 2; // The modulo operator (the percent sign) gets the remainder of the quotient    if (check == 0) {        cout << number << " is even!"; // If the remainder is 0 then it prints out "x is even"    } else {        cout << number << " is odd!"; // If the remainder is not 0 then it prints out "x is odd"    }}

5.
#include <iostream>#include <string>
using namespace std;
int main(){    float r; // Our variable    cout << "Enter a radius\n";    cin >> r;    if (r < 0){        cout << "Lol. No."; // If the radius is less than zero print out that message    }    float circumference=2*3.14*r;    float area=r*r*3.14;    cout << "\n\n Circumference of circle: " << circumference;    cout << "\n Area of circle: " << area;}
4 0
3 years ago
What are files that are placed on a computer by some websites when the user visits the site?
Otrada [13]

Answer:

A: Cookies.

Explanation:

Usually you will get a message about the site using "cookies" to help user experience.

3 0
3 years ago
The website of an international human rights organization stores a large database of information and provides search functionali
pishuonlain [190]

Answer:

False

Explanation:

This statement is false because International human rights stores large database so its search functionality is not limited to the website.

8 0
3 years ago
New evidence can lead to a change in scientific knowledge.<br><br> A. True<br> B.False
lidiya [134]

ιт ιѕ (α.) тяυє ιf уσυ fιи∂ иєω киσωℓєgє σи ∂σмєтнιиg ιт ¢αи ¢нαиgє ѕ¢ιєи¢є

ℓιкє нσω тнєу υѕє∂ тσ вєℓινє тнє єαятн ωαѕ fℓαт,σя нσω тнє єαятн ωαѕ тнє ¢єитєя σf тнє υиινєяѕє

нσρє ι ¢συℓ∂ нєℓρ уσυ!!!!!!!!

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which statements describe the advantages of using XML?
    12·2 answers
  • Knowing the meaning of the acronym WYSIWYG can be most helpful to you when you
    14·1 answer
  • Which transformation(s) can be used to map ARST onto
    8·1 answer
  • A type of malicious code that appears to be a safe program but that actually has a hidden purpose is called a _____.
    7·2 answers
  • What allows people to create their own radio shows over the internet?
    14·1 answer
  • The set of folders and subfolders that MATLAB searches through to locate a command or M-file is called the ___________.(fill in
    9·1 answer
  • What is a short sequence of characters that appears at the end of a filename and is preceded by a period called __________
    5·1 answer
  • Technician A says that as volume decreases, pressure increases. Technician B says that as temperature increases, pressure decrea
    15·2 answers
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • True or false altering iso will affect the area of focus in a photo
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!