Transformacion

Page 1

include<conio.h> #include<stdio.h> #include<windows.h> #include<math.h> main() { int n,d,u; clrscr(); printf("programa de tranformacion\n"); printf("ingrese el valor a transformar\n"); scanf("%d",&n); d=n/10;//division entera u=fmod(n,10);//residuo de la division entera c=n/100; c switch(d) { case 1: { printf("x"); break; } case 2: { printf("xx"); break; } case 3: { printf("xx"); break; } case 4: { printf("xl"); break; } case 5: { printf("l"); break; } case 6: { printf("lx"); break; } case 7: { printf("lxx"); break; } case 8: { printf("lxxx"); break; } case 9: { printf("xc"); break; } } switch(u) { case 1: {


printf("i\n"); break; } case 2: { printf("ii\n"); break; } case 3: { printf("iii\n"); break; } case 4: { printf("iv\n"); break; } case 5: { printf("v\n"); break; } case 6: { printf("vi\n"); break; } case 7: { printf("vii\n"); break; } case 8: { printf("viii\"); break; } case 9: { printf("ix"); break; } switch(c) { case 1: { printf("c"); break; } case 2: { printf("cc"); break; } case 3: { printf("ccc"); break; } case 4: { printf("cd"); break; } case 5: { printf("d"); break; } case 6: {


printf("dc"); break; } case 7: { printf("dcc"); break; } case 8: { printf("dccc"); break; } case 9: { printf("cm"); break; } }//switch system("pause"); }


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.