Answer to Question #152422 in C++ for Usama Saleem

Question #152422
a program which takes as input two floating point numbers and prints "equal" if the two are equal.
1
Expert's answer
2020-12-21T16:07:50-0500
#include <iostream>
using namespace std;
int main () {
  float floating_point1, floating_point2;
  
  cout << "Enter the first floating point: "; cin >> floating_point1;
  cout << "Enter the second floating point: "; cin >> floating_point2;
  
  if (floating_point1 == floating_point2) {
    cout << "equal" << endl;
  }
  return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog