Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
import java.util.Scanner;
public class Nota {
static Scanner sc=new Scanner (System.in);
public static void main (String[]args) {
int n1,n2,n3,n4,n5;
int shuma;
double mes=0.0;
System.out.println ("Vendos noten e pare");
n1=sc.nextInt();
System.out.println ("Vendos noten e dyte");
n2=sc.nextInt();
System.out.println ("Vendos noten e trete");
n3=sc.nextInt();
System.out.println ("Vendos noten e katert");
n4=sc.nextInt();
System.out.println ("Vendos noten e peste");
n5=sc.nextInt();
shuma=n1+n2+n3+n4+n5;
mes=shuma/5;
System.out.print ("Mestarja eshte:" + mes );
if (mes>7) {
System.out.println ("ju fitoni degen e inxhinjerise");
}
else {
System.out.println ("Ju fitoni deget sportive");
}
}
}
//permiersimet
1. nr notave te percaktohet nga perdoruesi
kushti swith case
string dita;
dita>> nga tastjera
dita=sc.next();
switch (dita) {
case 'e hene' :
system.out.println ("dita e hene");
break;
.
.
.
default:
system.out.println ("Gabim dite");
}
package elda;
import java.util.Scanner;
public class switchcase {
public static void main(String[] args) {
Scanner sc=new Scanner (System.in);
String dita;
System.out.println("Vendos diten e sotme");
dita=sc.next();
switch (dita) {
case "hene":
System.out.println ("Dita e sotme eshte e hene");
break;
case "marte":
System.out.println ("Dita e sotme eshte e marte");
break;
case "merkure":
System.out.println ("Dita e sotme eshte e merkure");
break;
case "enjte":
System.out.println ("Dita e sotme eshte e enjte");
break;
case "premte":
System.out.println ("Dita e sotme eshte e premte");
break;
default:
System.out.println ("Sorry jemi pushim");
}}}
package elda;
import java.util.Scanner;
public class dowhile {
public static void main (String[]args) {
Scanner sc=new Scanner (System.in);
int i=1;
do {
System.out.println(i);
i++;
}
while (i<=10);
}}
package elda;
import java.util.Scanner;
public class whiledo {
public static void main(String[] args) {
Scanner sc=new Scanner (System.in);
int i=1;
int shuma=0;
while (i<=10) {
System.out.println (i);
i++;
shuma=shuma+i;
}
System.out.println ("shuma eshte:"+shuma);
}
}
package elda;
import java.util.Scanner;
public class whiledo {
public static void main(String[] args) {
Scanner sc=new Scanner (System.in);
int i=10;
int shuma=0;
while (i>=1) {
System.out.println (i);
i--;
shuma=shuma+i;
}
System.out.println ("shuma eshte:"+shuma);
}
}
detyra shtepie:
1. switch case: i lejon perdoruesit te vendosi nje shkronje ,sistemi do gjeje nese eshte zanore apo bashtingellore/
2. shuma e 10 numrave tek me kusht while
3. shuma e 10 numrave cift me for
![]() |
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team