Answer:
#include <iostream>
using namespace std;
int main() {
int currentYear = 2020;
int myCurrentAge = 23;
int myNewAge=myCurrentAge+(2050-currentYear);
cout << "My Current Age is " << myCurrentAge << endl;
cout << "I will be " << myNewAge << " in 2050." << endl;
}
Explanation:
- Initialize the currentYear with 2020 and myCurrentAge with 23.
- Add myCurrentAge with the the result of (2015 - currentYear) and assign this result to myNewAge variable.
- Finally display my current age and after that display the new age in 2050.
Output:
My Current Age is 23
I will be 53 in 2050.
Is not really a warm up!
we wait for the computer (electronic instrument) to load or process all the data in order to operate properly as its supposed to!
You didn't include the original function, but the new function will contain something like:
function kelvin_to_celsius(k)
{
return k - 273.15;
}
Depending of course on your programming language.
The outcome for negative Kelvin is undefined, you could test for that.
Answer:
// Variable Definitions
int a=67;
float b=78.8797;
Explanation:
For creating a single line comment we use // slash. It is used for making the comment in the program. In this we made a comment with help of // after that we create a two variable i.e a and b of integer and float type.