Write a program that will get two numbers and print the average
1
Expert's answer
2022-03-21T12:36:18-0400
#include<iostream>
using namespace std;
int main(int argc, char *argv[]){
float a,b;
cout<<"Please, enter two values:";
cin>>a>>b;
float res=(a+b)/2;
cout<<"The average is "<<res;
}
Comments
Leave a comment