5 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Alonso_1

So I'm trying to count the number of occurrences of each digit within an array. My code I've got so far looks like the following: #include <stdio.h> #include <string.h> int main() { int numbers [10]= {1, 4, 5, 5, 5, 6, 6, 3, 2, 1}; int count = 0; for(int …

Member Avatar for deceptikon
0
3K
Member Avatar for mslittle1

I need help with my homework assignment. The assignment is write a method DisplayDigits that receives an integer between 1 and 99999 and displays it as a sequence of digits, separating each pair of digits by two spaces. For example, 4562 should appear as 4 5 6 2 I have …

Member Avatar for mslittle1
1
466
Member Avatar for pwolf

How to return the sum of the last digits of the values in a list? i cant think of an efficient way. If it wasn't for being in a list i could do it, but im really lost. Can anyone advise me? im going to look for a way in …

Member Avatar for pwolf
0
4K
Member Avatar for Matth963
Member Avatar for Muhammad Anas

Hi, I am trying to write a program that will separate the digits of a non-negative integer and will print them each two spaces a apart but I have to avoid using arrays. For example if input is: 12345 then output should be: 1 2 3 4 5 I have …

Member Avatar for Muhammad Anas
0
3K

The End.