Write a program to perform class to basic conversion [Such as: Class is: Triangle with data members base and height(float), and basic type is float(area of triangle)].
#include<iostream>
using namespace std;
int main()
{
int arr[4];
for (int i = 0; i < 4; i++)
{
cout << "Please, enter a value " << i + 1 << ": ";
cin >> arr[i];
}
for (int i = 0; i < 4; i++)
{
cout << arr[i]<<" ";
}
}
Comments
Leave a comment