News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1231734433:v:use_geshi-1:v:type-java

Started by wzrd, Jan 12, 2009, 04:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wzrd

/*Ushtrim i thjesht ku mbledhim 3 numrat e pare, i zbresim te katertin dhe
 * shohim rezultatin
 */
import java.util.Scanner;
public class Mbledhje {
   public static void main (String args [] )
   {
      Scanner input = new Scanner (System.in);
      //Fillojm edhe thjesht therrasim disa variabila pa u dhene vlerat
      int a;
      int b;
      int c;
      int d;
      int rezultati;
      System.out.println("**********************");//per estetik
      System.out.print ("Fut numrin e pare:");
      a = input.nextInt();
      System.out.print ("Fut numrin e dyte:");
      b = input.nextInt();
      System.out.print ("Fut numrin e trete:");
      c = input.nextInt();
      System.out.print("Fusim numrin e fundit:");
      d = input.nextInt();
      rezultati = ( a + b + c - d );
/*Rezultati ne kete rast eshte nje menyre per zgjedhjen e problemit dhe me te
 * mund te bejm shume lloje veprimesh si + , - , / , * , mjafton te ndryshojm
 * shenjat tek rezultati dhe mund te kontrollojm veprimet.
 */
      System.out.printf("Rezultati eshte %d\n", rezultati);
      System.out.println("**********************");//per estetik
   }
   
}