Answer:
Check the explanation
Explanation:
public static int countMatching(String s, char c) {
int count = 0;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == c)
++count;
}
return count;
}
Method in a complete Java program
public class FizzBuzz {
/* sample run:
* z appears 2 time(s) in FIZZbuzz
*/
public static void main(String[] args) {
String s = "FIZZbuzz";
char c = 'z';
int count = countMatching(s, c);
System.out.printf("%c appears %d time(s) in %s%n", c, count, s);
}
// Put your countMatching() method here:
public static int countMatching(String s, char c) {
int count = 0;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == c)
++count;
}
return count;
}
}
z appears 2 time(s) in FIZZbuzz Process finished with exit code
mcvaefn<AMsdnmklmgkdmflavm
The answer is No
Im not sure but i think its C at least two but once again im not sure hope this helps :)
The pseudocode algorithm for the given program is:
- PROCESS saving account transactions
- REQUEST for previous account balance
- FOR every deposit made, (+)
- FOR every withdrawal made (-)
<h3>What is a Pseudocode?</h3>
This refers to the use of plain language to describe the sequence of steps for solving a problem in human language.
Hence, we can see that the complete step is given below:
5. DISPLAY "Withdrawal" when (-) is used.
6. DISPLAY "Deposit" when (+) is used
7. ELSE
8. PRINT "Error"
#SPJ1
Read more about flowcharts and pseudocodes here:
brainly.com/question/24735155
Each high-level language has its own syntax which is also called rules of the programming language. Therefore, the correct choice is syntax.
High-level languages have a greater level of abstraction from details of the computer. They focus more on the programming logic which is closely associated with human understanding instead of the underlying hardware modules. Each high-level programming language has its own specific set of rules which is known as the syntax of that language.
Syntax of the high-level languages define structure and formation of the statements in the language. In order to write a program in any high-level programming language, proper syntax of that programming language requires to be followed.
If the syntax of the programming language is not followed properly, the compiler will produce errors. In result, required output of the program will not be generated because of the failure of the program execution.
You can learn more about syntax at
brainly.com/question/831003
#SPJ4