Find the perimeter of triangle using c++ | Ameer Yousuf - C++ Programs Codes

Latest

Sunday, 31 January 2021

Find the perimeter of triangle using c++ | Ameer Yousuf

 CODE:


#include<iostream>
using namespace std;
int main(){
int s1,s2,s3,p;
cout<<"Length of Side 1: ";
cin>>s1;
cout<<"Length of Side 2: ";
cin>>s2;
cout<<"Length of Side 3: ";
cin>>s3;
p=s1+s2+s3;
cout<<"The perimeter is : "<<p<<endl;
}

OUTPUT: 



No comments:

Post a Comment

Plz don't enter any spam link in the comment box!