tag:blogger.com,1999:blog-959939550345671470.post7853011143840072903..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: C program to convert decimal to roman numberPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-959939550345671470.post-74372920763921766462016-12-01T06:26:47.788+05:302016-12-01T06:26:47.788+05:30This comment has been removed by the author.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-90825453135527986532016-12-01T06:26:46.892+05:302016-12-01T06:26:46.892+05:30lol
check the numebr 499
the output will be ldxcix...lol<br />check the numebr 499<br />the output will be ldxcix<br />which is the output for 549Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-39205535218559872572016-07-16T12:18:19.653+05:302016-07-16T12:18:19.653+05:30right...right...Anonymoushttps://www.blogger.com/profile/09727937575927830431noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-83853421335996454522015-11-02T01:41:40.001+05:302015-11-02T01:41:40.001+05:30you have to change the part:
predigits('L'...you have to change the part:<br /><br />predigits('L','D');<br />number = number - (500-100);<br /><br />TO<br />predigits('C','D');<br />number = number - (500-100);<br />Anonymoushttps://www.blogger.com/profile/08604440265904687123noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-88635289893681077552015-10-24T16:16:09.155+05:302015-10-24T16:16:09.155+05:30#include
int main ()
{int year,q,w,e,r,t,y,u,i,o;...#include<br /><br />int main ()<br />{int year,q,w,e,r,t,y,u,i,o;<br /> printf("enter ur num");<br /> scanf("%d",&year);<br /> q=year/1000;<br /> w=year%1000;<br /> e=w/100;<br /> r=w%100;<br /> t=r/10;<br /> y=r%10;<br /> for(u=1;u<=q;u++)<br /> printf("M");<br /> if(e>=5)<br /> {printf("D");<br /> for(ukanishkhttps://www.blogger.com/profile/16535449621085950154noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-18759669777193684132015-10-24T16:14:04.907+05:302015-10-24T16:14:04.907+05:30#include
int main ()
{int year,q,w,e,r,t,y,u,i,o;...#include<br /><br />int main ()<br />{int year,q,w,e,r,t,y,u,i,o;<br /> printf("enter ur num");<br /> scanf("%d",&year);<br /> q=year/1000;<br /> w=year%1000;<br /> e=w/100;<br /> r=w%100;<br /> t=r/10;<br /> y=r%10;<br /> for(u=1;u<=q;u++)<br /> printf("M");<br /> if(e>=5)<br /> {printf("D");<br /> for(ukanishkhttps://www.blogger.com/profile/16535449621085950154noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-49871694497193573752015-01-06T11:51:40.619+05:302015-01-06T11:51:40.619+05:30Sir this program is not working for the number: 49...Sir this program is not working for the number: 495.....i dont know why this error s occuring and i m unable to debug ur program as well so i kindly request you to provide a correct program ........Anonymoushttps://www.blogger.com/profile/13434961712928737242noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-18674810851058252142014-11-04T02:40:19.081+05:302014-11-04T02:40:19.081+05:30void dec2romanstr(int num){
int del[] = {1000,900...void dec2romanstr(int num){<br /> int del[] = {1000,900,500,400,100,90,50,40,10,9,5,4,1};<br /> char * sym[] = { "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I" };<br /> char res[64] = "\0";<br /> int i = 0;<br /> while (num){<br /> Anonymoushttps://www.blogger.com/profile/12575981151517938796noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-81210919076637899092013-04-04T02:52:43.978+05:302013-04-04T02:52:43.978+05:30the formatting of the website removed all the inde...the formatting of the website removed all the indentation.Lostpoethttps://www.blogger.com/profile/02975366575347632284noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-44064145263808686452013-04-04T02:51:54.541+05:302013-04-04T02:51:54.541+05:30much better program with not so many conditionals....much better program with not so many conditionals.<br /><br /><br />---------------------------------------------------<br />#include<br />#include<br />#include<br />void reverse(char a[]);<br />void roman(int x,char a[],int i);<br />char values[4][3] = {{'I','V','X'},{'X','L','C'},{'C','D','M'},{'C'}};<br />main()<Lostpoethttps://www.blogger.com/profile/02975366575347632284noreply@blogger.com