sum = 0; for (int i = 12; i
Well, it's very hard to write a flowchart in text, so I'll give you some pseudo code instead. int number = the given number int sum = 0 loop while number is not 0 sum = sum + (number mod 10) number = number / 10
#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(); }
Nikhil Aggarwalstrong_number: The sum of factorials of digits of a number is equal to the original number.void strong_number(){int num,i,p,r,sum=0,save_num;printf("\nEnter a number");scanf("%d",&num);save_num=num;while(num){i=1,p=1;r=num%10;while(i
#include<stdio.h> int main(){ int num,i,f,r,sum=0,temp; printf("Enter a number: "); scanf("%d",&num); temp=num; while(num){ i=1,f=1; r=num%10; while(i<=r){ f=f*i; i++; } sum=sum+f; num=num/10; } if(sum==temp) printf("%d is a strong number",temp); else printf("%d is not a strong number",temp); return 0; }
203
79 + 45 = 124
It is: 79 minus 45 = 34
The isotope, Se-79, has 45 neutrons (79 - 34 = 45)
Sum = 79*(79+1)/2 = 79*80/2 = 3160
From least to greatest: -45, -14, 79
45/79 x 100 = 56.9620253164556 recurring (that is, 56.96202531645569620253164556...) percent.
The sum of 45 and 246 is 291.
The sum of 8 times the last digit and the rest of the number is a multiple of 79
45
79
-45