JAVA SOURCE CODES WITH Unsolved Assignments for Practice

By qualityliteracy

Buy now
Digital delivery

Price: $0.50
Length: 2,440 words
About Blogit Items:

Description

www.computerscienceexpertise.com

Towards Quality IT Literacy For All. Remember If you are not IT Literate, You are Illiterate. Remember.

http://dheerajmehrotra.tripod.com/

To view what is worth buying or Not???

 

Excerpt

// Program to convert a given decimal number to roman form

// of range less than 50

import java.io.DataInputStream;

class w15

{

public static void main(String args[])

{

DataInputStream in = new DataInputStream(System.in);

int a=0;

try

{

System.out.println("Enter any number in decimal (less than 50):");

a = Integer.parseInt(in.readLine());

}

catch(Exception e)

{}

int b,c,d,e,f,j,h,l,i;

b=a%10;

c=a-b;

if (c==10)

{

System.out.println(" X");

}

if (c==20)

{

System.out.println(" XX");

}

if (c==30)

{

System.out.println(" XXX");

}

if (c==40)

{

System.out.println(" XL");

}

if (c==50)

{

System.out.println(" L");

}

h=b;

f=h;

d=f;

{

switch(d)

{

case 1:

System.out.println("I");

break;

case 2:

System.out.println("II");

break;

case 3:

System.out.println("III");

break;

case 4:

System.out.println("IV");

break;

case 5:

System.out.println("V");

break;

case 6:

System.out.println("VI");

break;

case 7:

System.out.println("VII");

break;

case 8:

System.out.println("VIII");

break;

case 9:

System.out.println("IX");

break;

}

}

d=0;

}

}

 

 

Reviews & Comments

Average customer review: (none)

Add a comment

Referrals - About Us - Press - Terms of Use - Privacy Policy - Conduct Policy
Copyright © 2017 Shaycom Corporation. All rights reserved.