java - Write a method called replace3sWith4s() that takes an integer array, and changes any element that has the value 3 to instead have the value 4 -
write method called replace3swith4s() takes integer array, , changes element has value 3 instead have value 4.
need include loop aswell
void replace3swith4s (int [] x) { (int = 0; < x.length; i++) { if (x[i] == 3) { } } } heres code @ moment else need do??
using java
so close....
if (x[i] == 3) { x[i] = 4; }
Comments
Post a Comment