📌  相关文章
📜  在 c++ 代码示例中检查三个数字中最小 num 的程序

📅  最后修改于: 2022-03-11 14:44:49.670000             🧑  作者: Mango

代码示例1
#include 
using namespace std;

int main() {
 
    int a, b, c;
 
    cout << "Enter three numbers \n";

    /* Taking input */
    cin >> a >> b >> c;
 
    /* If a is smaller than b and c. */

    if (a < b && a < c) {
        cout << "Smallest number is " << a;

      /* If b is smaller than a and c */
    } else if (b < a && b < c)  {
       cout << "Smallest number is " << b;

    } else {
      cout << "Smallest number is "<< c;

     }
 
      return 0;
}