Thursday, June 3, 2021

C++ program calculate third side of a triangle (POP) (117)

#include<iostream>

using namespace std;

int main()

{

int ang1,ang2,ang3;

cout<<"please enter the first angle of triangle:";

cin>>ang1;

cout<<"please enter the second angle of triangle:";

cin>>ang2;

ang3=180-(ang1+ang2);

cout<<"the third angle of triangle is:"<<ang3<<endl;

} 

No comments:

Post a Comment