fork download
  1. #include <stdio.h>
  2. #include <locale.h>
  3. int sum(int a,int *b){
  4. int z,n,t;
  5. z=0;n=0;
  6. while (a!=0){
  7. t=a%10;
  8. a=a/10;
  9. if (t%2!=0){
  10. z=z+1;
  11. n=n+t;
  12. }
  13. }
  14. *b=z;
  15. return n;
  16. }
  17. int main(){
  18. int a,b,res;
  19. printf("Vvod\n");
  20. scanf("%d",&a);
  21. res=sum(a,&b);
  22. printf("kolichestvo nechetnih %d и summa nechetnih %d\n",b,res);
  23. return 0;
  24. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
Vvod
kolichestvo nechetnih 0 и summa nechetnih 0