Pseudocode is a language that supports developers to create algorithms. It is a "text-specific" design tool (algorithmic). These rules are relatively easy, and its "dependency" declaration must be indented. It includes while, do, for, if, and switch, and the further discussion can be defined as follows:
Pseudo code:
Read n1 ,n2, n3,n4
Set sum to n1+n2+n3+n4
Write sum
set s1 to n1+n2
set s2 to n3+n4
If(s1 > S2)
Write "first two variable sum is large"
Else
Write "last two variable sum is large"
set average to sum/4
Write average
Program:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int n1,n2,n3,n4,sum,s1,s2;//defining integer variable
float average;//defining float variable
cout << "Enter numbers: "<< endl;//print message
cin>>n1>>n2>>n3>>n4;//input value
sum= n1+n2+n3+n4;//adding value into sum variable
cout<<"Sum: "<<sum<<endl;//print sum value
s1=n1+n2;//adding first two number value into s1 variable
s2=n3+n4;//adding last two number value into s2 variable
if(s1 > s2)//comaring the difference into s1 and s2
cout<<"first two variable sum is large."<<endl;//print message
else
cout<<"last two variable sum is large."<<endl;//print message
average=sum/4;//calculating the average
cout<<"Average: "<<average<<endl;//print variable value
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/18519473