answersLogoWhite

0

Read the characters one at a time, and write an "if" for each of the cases. In each case, if the condition is fulfilled, increment the corresponding counter variable.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

How many digits in a program element code?

The PEC must be 8 digits ending in a letter.


What is the sum of the digits from 1 to 100?

5050, according to the program I quickly whipped up.


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


Using while loop write a program which calculates the product of digits from 1 to 5 and also show these nos vertically?

Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.


C plus plus program to print sum of uppercase digits?

Good luck. I don't think it is possible, since there is no such thing called upper case digits.


How many digits are sufficient to support most cosmological calculations?

It is claimed that pi, to 39 digits provides a level of accuracy sufficient to "draw" a circle the size of a hydrogen atom at the far end of the known universe. However, few cosmological constants are known t anything approaching that level of accuracy.


What is the sum of all possible four digit numbers using the digits 4068?

-- If you accept 4-digit numbers with 'zero' as the first digit, thenthere are 24 possibilities, and their sum is 119,988 .-- If the first digit can't be a 'zero', then there are 18 possibilities,and their sum is 115,992 .Note: I didn't repeat any digits.-- If you allow repeated digits, and accept leading zeros, then there are 256 possibilities,and their sum is 1,279,872.-- If you allow repeated digits but not leading zeros, then there are only 192 possibilities,and their sum is 1,247,904.


How do you write a Java program to accept a 3-digits integer number and print out the highest digit from the derived input?

The tricky part is getting the individual digits. There are basically two ways to do this: 1) Convert the number to a string, and use string manipulation to get the individual digits. 2) Repeatedly divide the number by 10. The digit is the remainder (use the "%" operator). To actually get the highest digit, initially assume that the highest digit is zero (store this to a variable, called "maxDigit" or something similar). If you find a higher digit, replace maxDigit by that.


Write a program to find the number of digits in the number?

#include <stdio.h> int main(int argc, char **argv) { if (argc<1) { printf("Usage: %s number\n",argv[0]); return -1; } int digits=1, i=atoi(argv[1]); while (i/=10) ++digits; printf("%d\n",digits); }


What is the first million digits of pi?

There is a computer program that will print out the value of pi to even more decimal places than that.


Shell program to find the sum of square of individual digits of a number?

There are many shell programs that will find the sum of the square of individual digits of a number. A small example is: SD=3n=2, sum=2, and SD=2.


How long did it take for 1-billion places of π to be calculated?

Partial answers: PiFast by Xavier Gourdon was the fastest program for Microsoft Windows in 2003. According to its author, it can compute one million digits in 3.5 seconds on a 2.4 GHz Pentium 4 But I doubt if the next 999 million digits would take just 999 times as long ( about one hour) the time probably increases exponentially.Super PI by Kanada Laboratory in the University of Tokyo is the program for Microsoft Windows for runs from 16,000 to 33,550,000 digits. It can compute one million digits in 40 minutes and two million digits in 90 minutes and four million digits in 220 minutes on a Pentium 90 MHz.