fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int x=321,b0,b1,b2,sum;
  6. b0= x/100;
  7. b1= (x-b0*100)/10;
  8. b2=x%10;
  9. sum=b2+b1*10+b0*100;
  10. printf("sum=%d",sum);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5268KB
stdin
Standard input is empty
stdout
sum=321