Program 7:: Max and Min

// Program 7:: Write a Program to find max and min of two integer

//

import java.io.*;

class min_max

{

public static void main(String args[])

{

DataInputStream in=new DataInputStream(System.in);

int a=0;

int b=0;

int c=0;

try

{

System.out.print("Enter 1st number=");

a = Integer.parseInt(in.readLine());

System.out.print("Enter 2nd number=");

b = Integer.parseInt(in.readLine());

}



catch(Exception e){}

c=(a>b?a:b);

System.out.println("Maximum number is="+c);

c=(a
System.out.println("Minimum number is="+c);

}

}

// Engr. Parag Ferdus 01713 400 421, 01914 949 399, 01670 876 388

// www.pfbd.yolasite.com paragferdus@gmail.com

Comments

Popular posts from this blog

মোবাইল ফোন হাত থেকে পড়লে কত সেকেন্ডের মধ্যে তুলে ফেললে ডিসপ্লে ভাঙবে না?

বাংলাদেশে Google Pay (GPay) নিয়ে বাস্তব অভিজ্ঞতা

What if... "Oppenheimer didn’t build the bomb” – A Butterfly Effect Narrative (2025 Alternate Reality)