Cpp Basic 62: Math Order

11 January 2020, 1:56 am by antelove19

C++ programming language

C++ programming language



Happy Coding


main.cpp

/* ------------------------------------------------------------ */
/*  Math                                                        */
/*  Using Arithmetic Operators Order                            */
/*                                                              */
/*  Author: antelove                                            */
/*  Website: antelove.com                                       */
/* ------------------------------------------------------------ */

#include <iostream>

using namespace std;

int main() {

    int a;

    cout << "25 / 5 * 2 + 3 = " << 25 / 5 * 2 + 3 << endl;

    cout << "25 / 5 * (2 + 3) = " << 25 / 5 * (2 + 3) << endl;

    return 0;    

}

Thank for reading :)


Keywords:


No Action Title
1 Live
2 Editor
0 comment