Computer Science, asked by heerasrivastava1, 8 months ago

राइट ए प्रोग्राम इन जवा टो चेक एंड कैलकुलेट इन परचेसिंग अमाउंट इन ग्रेटर दैन 2000 the discount will be 5% and below purchasing amount is 2000 the discount will be 2% print the result​

Answers

Answered by sanjeevsitapur2
0

Answer:

import java.util.*;

class discount{

public static void main(String []args){

Scanner sc=new Scanner(System.in);

int cp;

System.out.println("Enter the Cost Price");

cp=sc.nextInt();

if(cp>2000){

System.out.println("Discount is 5%");

}else{

System.out.println("Discount is 2%");

}

}

}

_____________________________

HOPE IT HELPS :)

Similar questions