Lab Assignment 2 CSE 100 Arizona State University 10 points Objectives: To get familiar with input and output statements, and different data types in C++. Task 1:
Lab Assignment 2 CSE 100 Arizona State University 10 points Objectives: To get familiar with input and output statements, and different data types in C++. Task 1: Understand how to use cin and cout. Task 2: Study different data types such as int, float, and double. Task 3: To write a C++ program to find the area of a triangle whose base and height are given. Programming Instructions: Make new project (Visual C++ Empty Project) named lab2 and add a C++ file named lab2.cpp to this project. (Some IDE may automatically generate main.cpp or source.cpp, then you just rename it to lab2.cpp when you submit the assignment.) Then, write a C++ program to perform the task 3 mentioned above. Please refer to the code template provided below. Submission Instructions: 1. Upload the zipped folder lab2.zip (containing lab2.cpp file and lab2 application/executable file) on the Lab 2 submission link on the Blackboard. 2. Submissions in the form of email/paper copy or any other format will not be accepted. 3. Submission after the deadline will result in zero marks. 4. Deadline: 11.59 PM on the day of your lab session. Grading Criteria: 1: Submit correct file format, lab2.cpp and lab2 application file in lab2.zip file. (2 points) 2: The submitted program is able to compile without any error. (4 points) 3: The program produces correct output. (4 points) Code Template: #include using namespace std; int main(){ // Work with int, float, and double double height, base, area; // Write a code to take base and height as input, and print area as output. _________________________________; _________________________________; _________________________________; system(“pause”); return 0; }
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
