What will the following
A) #include <iostream>
using namespace std;
int main()
{
int freeze = 32, boll = 212;
freeze = 0;
boil = 100;
cout « freeze << endl << boil << endl;
return 0;
}
B) #include <iostream>
using namespace std:
int main()
{
int x = 0, y = 2;
x = y * 4;
cout << x << endl << y << endl;
return 0;
}
C) #include <iostream>
using namespace std;
int main()
{
cout << "I am the incredible";
cout << "computing\nmachine";
cout << "\nand I wil1\namaze\n";
cout << "you.\n";
return 0;
}
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
STARTING OUT WITH C++ MPL
Additional Engineering Textbook Solutions
Absolute Java (6th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Database Concepts (8th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Problem Solving with C++ (9th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
- This assignment is not graded, I just need to understand how to do it. Please help, thank you! Language: C++ Given: Main.cpp #include #include "Shape.h" using namespace std; void main() { /////// Untouchable Block #1 ////////// Shape* shape; /////// End of Untouchable Block #1 ////////// /////// Untouchable Block #2 ////////// if (shape == nullptr) { cout << "What shape is this?! Good bye!"; return; } cout << "The perimeter of your " << shape->getShapeName() << ": " << shape->getPerimeter() << endl; cout << "The area of your " << shape->getShapeName() << ": " << shape->getArea() << endl; /////// End of Untouchable Block #2 //////////} Shape.cpp string Shape::getShapeName() { switch (mShapeType) { case ShapeType::CIRCLE: return "circle"; case ShapeType::SQUARE: return "square"; case ShapeType::RECTANGLE: return "rectangle"; case…arrow_forwardNonearrow_forward#include using namespace std; void myfunction(int num2, int num1); lint main() { my function (5,2); return 0; } void myfunction(int num1, int num2) {if (num1>3) cout << "A1"; else if (num1<3) cout<<"A2"; else cout<<"A3";} O A2 O A1 O A3 A1 A2 A3arrow_forward
- #include using namespace std3; int main() { int x-6; int y=103; int z=0; int q=1; Z+= X-- -ys q*=++z+y; cout<arrow_forward#include using namespace std; class fraction{ float d,s; public: fraction() { d=0; s=1; fraction(int a, int b) { d=%3; s=b3; } void print() { cout<arrow_forwardc++, print the outputarrow_forward#include using namespace std3; int main() { int s-4; int d-s++; cout<arrow_forwardC++ Help me fix my code please! I'm missing something and can't figure it out. Code and error picture are below. #include <iostream> using namespace std; class Employee{ public: string first_name; string last_name; int monthly_sal; int increment; Employee() { first_name=""; last_name=""; monthly_sal=0; increment=0; } void setFirst_Name(string first_name) { this->first_name=first_name; } void setLast_Name(string last_name) { this->last_name=last_name; } void setSal(int monthly_sal) { if(monthly_sal<0) this->monthly_sal=0; this->monthly_sal=monthly_sal; } void setInc(int increment) { monthly_sal += increment; } string getFirst_Name() { return first_name; } string getLast_Name() { return last_name; } int get_salary() { return monthly_sal; } int get_increment() { return increment;…arrow_forwarddebugarrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_iosRecommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSONC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill EducationIntroduction to Variables; Author: Neso Academy;https://www.youtube.com/watch?v=fO4FwJOShdc;License: Standard YouTube License, CC-BY