input the name of the customer and data usage for a month if the data usage is more than 30gb then print data usage is over limit else print data usage is under limit
Answers
Answer:
Python
name = input("Enter your name: ")
data_usage = float(input("Enter data usage in GBs: "))
if data_usage>30 :
print(f"Dear {name}, you have gone over the data limit.")
else:
print(f"Dear {name}, you have not crossed the limit.")
Java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter name: ");
String name = scanner.nextLine();
System.out.println("Enter data usage: ");
float dataUsage = scanner.nextInt();
if(dataUsage>30) {
System.out.println("Dear " + name + ", you have crossed the limit.");
} else {
System.out.println("Dear " + name + ", you have not crossed the limit.");
}
}
}