fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int buddhistYear, christianYear;
  5.  
  6. printf("Enter Buddhist Era year (พ.ศ.): ");
  7. scanf("%d", &buddhistYear);
  8.  
  9. christianYear = buddhistYear - 543;
  10.  
  11. printf("The year in Anno Domini (ค.ศ.) is: %d\n", christianYear);
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5268KB
stdin
Standard input is empty
stdout
Enter Buddhist Era year (พ.ศ.): The year in Anno Domini (ค.ศ.) is: 32224