initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
||||
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
Scanner sc = new Scanner(System.in);
|
||||
|
||||
// for(int i = 0; i < 5; i = i + 1){
|
||||
// System.out.println("**** " + i);
|
||||
// }
|
||||
|
||||
// System.out.println("veuiller saisir un mot : ");
|
||||
// String str = sc.nextLine();
|
||||
// System.out.println("Vous avez saisi : " + str);
|
||||
|
||||
// int a = 1; int b = 15;
|
||||
|
||||
// while (a < b){
|
||||
// System.out.println("coucou " + a + " " + b);
|
||||
// a++;
|
||||
// }
|
||||
|
||||
// char reponse = 'O';
|
||||
|
||||
// while (reponse == 'O') {
|
||||
// System.out.println("veuiller saisir un prenom : ");
|
||||
// String prenom = sc.nextLine();
|
||||
// System.out.println("Bonjour, " + prenom);
|
||||
// System.out.println("voulez-vous réessayer ? (O/N) ");
|
||||
// reponse = sc.nextLine().charAt(0);
|
||||
// }
|
||||
// System.out.println("A+");
|
||||
|
||||
char reponse = 'O';
|
||||
|
||||
do{
|
||||
System.out.println("veuiller saisir un prenom : ");
|
||||
String prenom = sc.nextLine();
|
||||
System.out.println("Bonjour, " + prenom);
|
||||
System.out.println("voulez-vous réessayer ? (O/N) ");
|
||||
reponse = sc.nextLine().charAt(0);
|
||||
} while (reponse == 'O');
|
||||
System.out.println("A+");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
||||
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
// Exercice 1 :
|
||||
|
||||
// écrire un programme affichant la table de multiclication d'un nombre saisi par l'utilisateur
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.println("Entrez le chiffre que vous voulez :");
|
||||
int num = sc.nextInt();
|
||||
for(int i = 1; i <= 10; i++ ){
|
||||
System.out.println(num + " x " + i + " = " + num*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
// Écrire un programme affichant les tables de multiplications des nombres de 1 à 10 dans un tableau à deux entrées.
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
for(int a=1; a<=10; a++){
|
||||
System.out.print(a + " : ");
|
||||
for(int b=1; b<=10;b++){
|
||||
System.out.print(a*b + " " );
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
// Écrire un programme demandant à l’utilisateur de saisir deux valeurs numériques b et n (vérifier que n est positif) et affichant la valeur bn.
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.print("Entrez le premier chiffre que vous voulez (b) : ");
|
||||
int b = sc.nextInt();
|
||||
|
||||
int n;
|
||||
do{
|
||||
System.out.print("Entrez le second chiffre que vous voulez (n), il doit être positif : ");
|
||||
n = sc.nextInt();
|
||||
// Vérification à effectuer pour savoir si "n" est positif, sinon on repart au "do"
|
||||
} while (n < 0);
|
||||
|
||||
System.out.println(b + " * " + n + " = " + b*n);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
// Ecrire un programme demandant la saisi d'une valeur `n` et afficahnt le carré suivant (n = 5 dans cette exemple):
|
||||
|
||||
// xxxxx
|
||||
|
||||
// xxxxx
|
||||
|
||||
// xxxxx
|
||||
|
||||
// xxxxx
|
||||
|
||||
// xxxxx
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.print("Entrez le chiffre que vous voulez : ");
|
||||
int num = sc.nextInt();
|
||||
|
||||
for(int x = 1; x <= num; x++){
|
||||
for(int y = 1; y <= num ; y++){
|
||||
System.out.print('x');
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user