Answer:
int count =0;
for(int i=0;i<10;i++)
{
if(myArray[i]>=0)
{
count++;
}
}
cout<<"Number of positive integers is "<<count<<endl;
Explanation:
The above written loop is for counting positive integers in the myArray[].
For counting we have taken a count integer initialized with 0.On iterating over the array if the element is greater than or equal to 0 we consider it as positive and increasing the count.At the end printing the count.
I think its D, double-headed if I remember right. If this is brainiest can you mark it, please! I am trying to rank up. Thanks, hun!
Answer:
This is the required code:
Explanation:
public class NumberToString {
public static String numToString(int num, int base) {
final String digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (num < base) {
return "" + digits.charAt(num);
} else {
return numToString(num / base, base) + digits.charAt(num % base);
}
}
}