Intro to C++
Session 7- One Sample C++ Program
By Coding-Bootcamps.com
################################################
################################################
################################################
Structures
Program # 1: Area
//Program to calculate the area of a room (Length * Width)
/* Kitchen measurements:
	Width = 10 feet 5.5 inches;
	Length = 12 feet 6.5 inches;
*/
#include <iostream>
using namespace std;

struct measurement {
	int feet;
	float inches;
};

struct room {
	measurement length;
	measurement	width;
};

int main() {
	room kitchen;
	// Store length
	kitchen.length.feet = 12;
	kitchen.length.inches = 6.5;
	// Store width
	kitchen.width.feet = 10;
	kitchen.width.inches = 5.5;

	float totalLength = kitchen.length.feet + (kitchen.length.inches / 12);
	float totalWidth = kitchen.width.feet + (kitchen.width.inches / 12);
	float area = totalLength * totalWidth;

	cout << "The area of our kitchen room is " << area;
	return 0;
}

################################################
