Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Programs in JAVA to get the remainder and quotient of given two numbers without using % and / operators?

Answer Posted / swap1710

import java.util.*;
class Rem
{
public static void main(String args[])
{
double f,qu,remi;
int i,qu1;
Scanner s= new Scanner(System.in);
System.out.println("Enter No..");
f=s.nextFloat();
qu=f*0.1;
qu1=(int)qu;
remi=(qu-qu1)*10;
System.out.println("quotient=" +qu1);
System.out.println("Reminder="+(int)remi);
System.out.println(qu1+"*10" + "+" +(int)remi+"="+(int)f);
}
}

/*
Output:


D:Javap>java Rem
Enter No..
45
quotient=4
Reminder=5
4*10+5=45
*/

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how CLR identify vb file?

2988


how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?

2231


Which method protects back button to retrieve old value from previous page in Struts.

1827


What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

7845


any drawback are there in mantis?

2100


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.

1197


Given an array of size n+1 which contains all the numbers from 1 to n.Find the number which is repeated in O(n) time.How do you proceed with the same with floating numbers from 0 to 1 instead of 1 to n?

1008


what is the difference between an OS(operating system) and Framework?

1957


how to hide prompts

1830


Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.

1048


what is apt_dump_score in datastage where it is useful

1918


What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe

1933


Define distributed queries. can you explain me as soon as possible

2069


What is web.configuration? how is it work? & wht is use this?

1830


Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in

1998