No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
string word = "abcde"; int count = 0; for(int i = 0; i < word.length(); i++){ for(int j = 1; j < word.length(); j++){ if(word.at(i) == word.at(j)){ count++; } } } i am trying to write a program that when i am given a string i can count letter pairs … | |
Re: declare sign as a char and not a double cause it makes no sense to have sign defined as double when its a character you know? try that and it should work but say sign == '*' and ect for the other operators | |
Re: So what the problem was you need to declare the z int and k int outside the for loop to have a starting point if that makes sense. then every time you run the loop and you get odd number, z will increment and the same for k with even … | |
I have a tic tac toe board i am finding it hard to figure out how to change parts of the array that contains char. I am looking for a way to to ask the user to select a char to change in the the array and then once they … | |
Re: import java.util.Scanner; public class ExamScores { public static void main (String[]args) { String a; int count= 0; int A=0; int B=0; int C=0; int D=0; int F=0; Scanner input = new Scanner (System.in); System.out.println("Enter your exam grades"); int grade = input.nextInt(); if (grade > 90 && grade <= 100) { … |
The End.