- Milyen okostelefont vegyek?
- Motorola Edge 50 Fusion - jó fogás
- iPhone topik
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Huawei Watch GT 6 és GT 6 Pro duplateszt
- Táncolni még nem tud, de stabilan áll az Android 17 a lábán
- Apple iPhone 17 - alap
- Apple Watch Sport - ez is csak egy okosóra
- Samsung Galaxy A36 5G - a középső testvér
- Apple iPhone 17e – mágnesek ereje
Új hozzászólás Aktív témák
-
mm00
aktív tag
válasz
Bettina87
#372
üzenetére
Tessék, egy alapnak jó lesz (google)

#include<stdio.h>
main()
{
int a,b,c,d,e;
clrscr();
printf("Input a number (between 1-3000):");
scanf("%d",&e);
while (e==0||e>3000)
{
printf ("ERROR: Invalid Input!
");
printf ("Enter the number again:");
scanf ("%d",&e);
}
if (e>3000)
printf("Invalid");
a = (e/1000)*1000;
b = ((e/100)%10)*100;
c = ((e/10)%10)*10;
d = ((e/1)%10)*1;
if (a ==1000)
printf("M");
else if (a ==2000)
printf("MM");
else if (a ==3000)
printf("MMM");
if (b == 100)
printf("C");
else if (b == 200)
printf("CC");
else if (b == 300)
printf("CCC");
else if (b == 400)
printf("CD");
else if (b ==500)
printf("D");
else if (b == 600)
printf("DC");
else if (b == 700)
printf("DCC");
else if (b ==800)
printf("DCCC");
else if (b == 900)
printf("CM");
if (c == 10)
printf("X");
else if (c == 20)
printf("XX");
else if (c == 30)
printf("XXX");
else if (c == 40)
printf("XL");
else if (c ==50)
printf("L");
else if (c == 60)
printf("LX");
else if (c == 70)
printf("LXX");
else if (c ==80)
printf("LXXX");
else if (c == 90)
printf("XC");
if (d == 1)
printf("I");
else if (d == 2)
printf("II");
else if (d == 3)
printf("III");
else if (d == 4)
printf("IV");
else if (d ==5)
printf("V");
else if (d == 6)
printf("VI");
else if (d == 7)
printf("VII");
else if (d ==8)
printf("VIII");
else if (d == 9)
printf("IX");
getch();
}
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- AKCIÓ! Asus ROG Z790 i9 13900K 32GB DDR5 1TB SSD RX 7900 XTX 24GB Lian LI LANCOOL 207 ROG 750W
- 27% - ASUS Prime 850W 80 PLUS Gold ATX 3.1 Táp!
- HIBÁTLAN iPhone 13 128GB Green-1 ÉV GARANCIA - Kártyafüggetlen, MS4347
- Lenovo L13 G2 Core i7 1165G7 16 Gb Ram FullHD IPS Intel Iris Boltból Számlával Garanciával
- Asus VC239 23 Full HD Monitor 6 hó garancia Házhozszállítás
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest



