Skip to content
View Ashe72's full-sized avatar

Block or report Ashe72

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ashe72/README.md

public class PrimaEmpleat { private String nom; private String directiu; private int antiguitat;

public static void main(String[] args) {

	PrimaEmpleat e = new PrimaEmpleat("Elvira", "S", 11);
	int p = 0;
	if (e.antiguitat >= 0 && e.antiguitat < 1000) {
		if (e.directiu == "S") {
			if (e.antiguitat > 12)
				p = 600;
			else {
				p = 400;
			}
		} else if (e.directiu == "N") {
			if (e.antiguitat > 12)
				p = 150;
			else
				p = 100;
		} else
			System.out.println("El codi del càrrec ha de ser 'S' o 								'N'");
		if (p!=0)
		   System.out.println("La prima que li correspon a " + e.nom
		 		          + " és de " + p + " Euros");
	} else
		System.out.println("La antiguitat ha de ser un nombre entre 0 i 							999");
}

public PrimaEmpleat(String nome, String dire, int ante) {
	this.nom = nome;
	this.directiu = dire;
	this.antiguitat = ante;
}

}

Popular repositories Loading

  1. ashe72 ashe72 Public

    El repositorio de Ashenafi