Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class FindInArray {
- public static void main(String[] args) {
- String[] student = {"Christian", "Michael", "Camila", "Sienna", "Tanya", "Connor", "Zachariah", "Mallory", "Zoe", "Emily"};
- Scanner input = new Scanner(System.in);
- System.out.println("Enter name student: ");
- String name = input.nextLine();
- boolean isExist = false;
- for (int i = 0; i < student.length; i++) {
- if (student[i].equals(name)) {
- System.out.println("Position of the students in the list " + name + " is: " + (i + 1));
- isExist = true;
- break;
- char** readJson(int* cmdListSize);
- bool findInArray(char** array, int arraySize, char* find);
- int main() {
- bool loop = true;
- char response[MAX_RESPONSE];
- int* cmdListSize;
- char** cmdList = readJson(cmdListSize);
- for (int i = 0; i < *cmdListSize; i++) {
- printf("%s", cmdList[i]);
- }
- get link:https://bit.ly/35MLQdi
Add Comment
Please, Sign In to add comment