Skip to content

Instantly share code, notes, and snippets.

@smyy96
Created January 20, 2022 22:46
Show Gist options
  • Save smyy96/231f19f6d8d8179c6e2273da02b7a00a to your computer and use it in GitHub Desktop.
Save smyy96/231f19f6d8d8179c6e2273da02b7a00a to your computer and use it in GitHub Desktop.
Patika Java 101 (Ödev 2) - Manav Kasa Programı
import java.util.Scanner;
public class ManavKasa {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int armut,elma,domates,patlıcan,muz;
System.out.print("Armut Kaç Kilo ? :");
armut=input.nextInt();
System.out.print("Elma Kaç Kilo ? :");
elma=input.nextInt();
System.out.print("Domates Kaç Kilo ? :");
domates=input.nextInt();
System.out.print("Muz Kaç Kilo ? :");
muz=input.nextInt();
System.out.print("Patlıcan Kaç Kilo ? :");
patlıcan=input.nextInt();
System.out.print("Toplam Tutar :"+((armut*2.14)+(elma*3.67)+(domates*1.11)+(muz*0.95)+(patlıcan*5))+"TL");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment