
ADI creations
Use this card to highlight your latest videos and drive people to subscribe to your YouTube Channel.
Use this card to highlight your latest videos and drive people to subscribe to your YouTube Channel.
[15/10, 11:52 am] Home = jio: import java.util.Scanner;
public class Greater_number
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Input first number: ");
int n1 = in.nextInt();
System.out.print("Input second number: ");
int n2 = in.nextInt();
System.out.print("Input third number: ");
int n3 = in.nextInt();
if(n1 >= n2)
{
if(n1 >= n3)
System.out.println(n1 + " is the largest number.");
else
System.out.println(n3 + " is the largest number.");
}
else
{
if(n2 >= n3)
System.out.println(n2 + " is the largest number.");
else
System.out.println(n3 + " is the largest number.");
}
if (n1<0 && n2< 0 && n3<0)
System.out.println(" Entered numbers are negative numbers.");
else if (n1>0 && n2> 0 && n3>0)
System.out.println(" Entered numbers are positive numbers.");
else
System.out.println(" Entered numbers are mixed numbers..");
}
}
[16/10, 10:25 am] Home = jio: import java.util.*;
class ComputeElectricityBill {
// Function to calculate the
// electricity bill
public static int calculateBill(int units)
{
// Condition to find the charges
// bar in which the units consumed
// is fall
if (units <= 100) {
return units * 10;
}
else if (units <= 200) {
return (100 * 10)
+ (units - 100)
* 15;
}
else if (units <= 300) {
return (100 * 10)
+ (100 * 15)
+ (units - 200)
* 20;
}
else if (units > 300) {
return (100 * 10)
+ (100 * 15)
+ (100 * 20)
+ (units - 300)
* 25;
}
return 0;
}
// Driver Code
public static void main(String args[])
{
int units = 250;
System.out.println(
calculateBill(units));
}
}
[21/10, 12:29 pm] Home = jio: package com.exo;
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the consumer's name : ");
String g = sc.nextLine();
System.out.println("Enter the consumers number : ");
long h = sc.nextLong();
System.out.print("Enter the units : ");
int a = sc.nextInt();
double b = 4.80;
double c = 5.50;
double d = 6.80;
double e = 7.50;
double f;
System.out.println("----------------------------------------");
System.out.println(" Bihar electricity board.");
System.out.println(" Money reciept");
System.out.println("Consumer name "+g);
System.out.println("Consumer number "+h);
System.out.println("unit consumed "+a);
if(a<=100)
{
f = b*a;
System.out.println("Monthly amount "+(4*f));
System.out.println("Quarterly amount "+f);
}
else if(a>100 && a<=300)
{
f=(b*100+(c*(a-100)));
System.out.println("Monthly amount "+(4*f));
System.out.println("Quarterly amount "+f);
}
else if(a>300 && a<=600)
{
f = b*100+(c*(a-100))+d*(a-300);
System.out.println("Monthly amount "+(4*f));
System.out.println("Quarterly amount "+f);
}
else if(a>600)
{
f = (b*100+(c*(a-100) +d*(a-300)+e*(a-600)));
System.out.println("Monthly amount "+(4*f));
System.out.println("Quarterly amount "+f);
}
else
{
System.out.println("Please enter the correct value");
}
sc.close();
}
}
Write 1-2 sentences describing what followers will find when they tap the link.
https://msha.ke/adijavaWrite 1-2 sentences describing what followers will find when they tap the link.
External linkWrite 1-2 sentences describing what followers will find when they tap the link.
External link