Sunday, 27 December 2020

Write a Program in C++ to input 3 Numbers and display the smallest number. Hint: Use min()

 #include<iostream>

#include<cmath>

using namespace std;

main()

    {

        int a,b,c,Min;

        cout<<"Enter 3 Numbers\n";

        cin>>a>>b>>c;

        Min=min(a,b);

        Min=min(Min,c);

        cout<<"Smallest Number= "<<Min;

    }

No comments:

Post a Comment

Java Program to count the total number of characters in a string

 //Java Program to count the total number of characters in a string import java.util.*; public class CountChars {     public static void mai...