SlideShare a Scribd company logo
1 of 2
could u create recursive signed Division Signed Numbers use java
Solution
import java.util.*;
class Main
{
public static void main(String []args)
{
Main m = new Main();
Scanner input=new Scanner(System.in);
int number1,number2;
System.out.println("Enter Divisor");
number1=input.nextInt();
System.out.println("Enter Dividend");
number2=input.nextInt();
input.nextLine();
System.out.println(Division(number1,number2));
}
public static int Division(int n,int b)
{
int r=n;
if(b==0)
{return 0;
}
else if(n<b)
return 0;
else
{
r=n-b;
}
return (r-Division(r,b));
}
}

More Related Content

More from gertrudet

More from gertrudet (15)

Describe the most common eligibility requirements in qualified plans-S.docx
Describe the most common eligibility requirements in qualified plans-S.docxDescribe the most common eligibility requirements in qualified plans-S.docx
Describe the most common eligibility requirements in qualified plans-S.docx
 
Describe how media formats- features- and trends differ around the wor (1).docx
Describe how media formats- features- and trends differ around the wor (1).docxDescribe how media formats- features- and trends differ around the wor (1).docx
Describe how media formats- features- and trends differ around the wor (1).docx
 
Describe stateful inspection firewalls- and explain how tables track t.docx
Describe stateful inspection firewalls- and explain how tables track t.docxDescribe stateful inspection firewalls- and explain how tables track t.docx
Describe stateful inspection firewalls- and explain how tables track t.docx
 
Describe a situation in which you have experienced harm as a consequen.docx
Describe a situation in which you have experienced harm as a consequen.docxDescribe a situation in which you have experienced harm as a consequen.docx
Describe a situation in which you have experienced harm as a consequen.docx
 
Describe how media formats- features- and trends differ around the wor.docx
Describe how media formats- features- and trends differ around the wor.docxDescribe how media formats- features- and trends differ around the wor.docx
Describe how media formats- features- and trends differ around the wor.docx
 
Describe briefly FIVE forms of protectionism a government could engage.docx
Describe briefly FIVE forms of protectionism a government could engage.docxDescribe briefly FIVE forms of protectionism a government could engage.docx
Describe briefly FIVE forms of protectionism a government could engage.docx
 
Define the processes of differentiaton and integration-SolutionA- Diff.docx
Define the processes of differentiaton and integration-SolutionA- Diff.docxDefine the processes of differentiaton and integration-SolutionA- Diff.docx
Define the processes of differentiaton and integration-SolutionA- Diff.docx
 
Describe methods of heat transfer- Give examples-Solutionthere are thr.docx
Describe methods of heat transfer- Give examples-Solutionthere are thr.docxDescribe methods of heat transfer- Give examples-Solutionthere are thr.docx
Describe methods of heat transfer- Give examples-Solutionthere are thr.docx
 
Depreciation expense is not a cash flow item but it will affect the ca.docx
Depreciation expense is not a cash flow item but it will affect the ca.docxDepreciation expense is not a cash flow item but it will affect the ca.docx
Depreciation expense is not a cash flow item but it will affect the ca.docx
 
Define a set of keywords sorted by relevance to related to the theme -.docx
Define a set of keywords sorted by relevance to related to the theme -.docxDefine a set of keywords sorted by relevance to related to the theme -.docx
Define a set of keywords sorted by relevance to related to the theme -.docx
 
Define a structure called WeatherData to store the following weather d.docx
Define a structure called WeatherData to store the following weather d.docxDefine a structure called WeatherData to store the following weather d.docx
Define a structure called WeatherData to store the following weather d.docx
 
Define mass- force- and weight- What are the SI and US units for each-.docx
Define mass- force- and weight- What are the SI and US units for each-.docxDefine mass- force- and weight- What are the SI and US units for each-.docx
Define mass- force- and weight- What are the SI and US units for each-.docx
 
Dean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docx
Dean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docxDean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docx
Dean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docx
 
Data Warehousing is in use everywhere- Discuss the advantages and disa.docx
Data Warehousing is in use everywhere- Discuss the advantages and disa.docxData Warehousing is in use everywhere- Discuss the advantages and disa.docx
Data Warehousing is in use everywhere- Discuss the advantages and disa.docx
 
Database Of the following data storage technologies- Permanent Data St.docx
Database Of the following data storage technologies- Permanent Data St.docxDatabase Of the following data storage technologies- Permanent Data St.docx
Database Of the following data storage technologies- Permanent Data St.docx
 

Recently uploaded

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

could u create recursive signed Division Signed Numbers use javaSoluti.docx

  • 1. could u create recursive signed Division Signed Numbers use java Solution import java.util.*; class Main { public static void main(String []args) { Main m = new Main(); Scanner input=new Scanner(System.in); int number1,number2; System.out.println("Enter Divisor"); number1=input.nextInt(); System.out.println("Enter Dividend"); number2=input.nextInt(); input.nextLine(); System.out.println(Division(number1,number2)); } public static int Division(int n,int b)
  • 2. { int r=n; if(b==0) {return 0; } else if(n<b) return 0; else { r=n-b; } return (r-Division(r,b)); } }