#include<stdio.h>
#include<conio.h>
void main()
{
int oddSum = 0, evenSum = 0, i = 0;
char n[50] = {0};
clrscr();
printf("Enter the number : ");
scanf("%s", n);
while(n[i] != '\0')
{
if(i % 2 == 0)
oddSum = oddSum + (n[i] - 48);
else
evenSum = evenSum + (n[i] - 48);
++i;
}
printf("Odd sum is %d and even sum is %d\n", oddSum, evenSum);
getch();
}
Add the digits together. The sum of the digits of 23 is 5.
when you have an even amount of numbers while trying to find the median, you first find the two numbers that are at the median and then take all the numbers between them and find the median of that. if that amount of digits is also even, then you must have a decimal median.
yes
34.
No, pi is an irrational number that has an infinite amount of digits, it starts out with 3.14159265358979323846264338327 That is to only 30 digits, but you can find more if you Google 'pi'.
#include<stdio.h> #include<conio.h> main() { int n,s,r,t; clrscr(); printf("enter n"); scanf("%d",&n); s=0;t=0; while(n!=0) { r=n%10; { if(r%2!=0) t=t+r; if(r%2==0) s=s+r; } n=n/10; } printf("sum of even position digits%d\n",s); printf("sum of odd position digits%d\n",t); getch(); }
Since there are two multiples of 5, and plenty of even numbers, the last two digits are 00.
It's the number that has more digits to the left of the decimal point (if there is no decimal point, it's the number with more digits). If the number of digits to the left of the decimal point is the same, find the position farthest to the left where the digits are different. The number with the greater of those two digits is the greater number. For example, 10000 is greater than 9999 because 10000 has more digits, and 6350 is greater than 6349 because the farthest-left position that is different is the tens place, and 5 is greater than 4.
Add the digits together. The sum of the digits of 23 is 5.
Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.
Add the digits together. The sum of the digits of 23 is 5.
when you have an even amount of numbers while trying to find the median, you first find the two numbers that are at the median and then take all the numbers between them and find the median of that. if that amount of digits is also even, then you must have a decimal median.
To find the largest three-digit even number using the digits 3, 4, and 5, you need to arrange these digits in descending order to maximize the number, ensuring that the last digit is even. The largest possible even number is 542
Find a day and make up a bunch of dinners that your family enjoys, and freeze them (You could even freeze the different courses separately so that you can
No. Compare equivalent digits one by one, from left to right, until you find a digit where there is a difference. In this case, the number with the bigger digit in that position is also the bigger number.
If you look around for different brands you will be able to find sets that come with both the table and the umbrella. Usually, they will sell them separately but if you search at warehouses like Costco or BJ's, they will often have them in sets or even if they sell them separately they will be a little cheaper than other retail stores.
where can i find the position of a place