fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. // Function to convert decimal to Roman Numerals
  6.  
  7. int printRoman(int number)
  8.  
  9. {
  10.  
  11. int num[] = {1,4,5,9,10,40,50,90,100,400,500,900,1000};
  12.  
  13. string sym[] = {"I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M"};
  14.  
  15. int i=12;
  16.  
  17. while(number>0)
  18.  
  19. {
  20.  
  21. int div = number/num[i];
  22.  
  23. number = number%num[i];
  24.  
  25. while(div--)
  26.  
  27. {
  28.  
  29. cout<<sym[i];
  30.  
  31. }
  32.  
  33. i--;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:26: fatal error: bits/stdc++.h: No such file or directory
 #include <bits/stdc++.h>
                          ^
compilation terminated.
stdout
Standard output is empty