11 views

Uploaded by Ravi Kumar

hhhhh

hhhhh

© All Rights Reserved

- Syllabus
- Learn Arduino With the Arno
- Oop Java Codes Summary
- Graphic
- C++PracticeSet-2.pdf
- Ph2150 Notesaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- i3_Maths_tutorial_[Wazhua.Com]
- Hcl Quantitative Ability
- Reinforce
- MELJUN CORTES Introduction to C Programming Complete
- PMS_API_eng_v1.8
- a
- tutorial1sp-141001003259-phpapp02
- Workshop 10 A
- New Microsoft Word Document (2)
- c++ 25 exercise
- ProgrammerGuide_V2.6
- CRM UML
- Code is Ssue
- csc113-lab-2

You are on page 1of 6

1.AddTwoNums

Problem Statement

Given two numbers as input, calculate the sum of the numbers.

Sample Input #1

add(289,266)

Sample Output #1

555

Sample Input #2

add(-100,67)

Sample Output #2

-33

Code:

public class AddTwoNums {

AddTwoNums obj= new AddTwoNums();

int result = obj.add(289,266);

System.out.println(result);

}

//write your code here

public int add(int num1, int num2){

int sum = num1+num2;

System.out.println(sum);

return sum;

2. RunsInSeries

Problem Statement

The scores of a batsman in the five matches of a one day international series have been

provided. Calculate the total number of runs the batsman scored in the series.

Sample Input #1

computeRuns(51,0,96,44,70)

Sample Output #1

261

Sample Input #2

computeRuns(12,8,21,22,0)

Sample Output #2

63

Code:

public class RunsInSeries {

RunsInSeries obj = new RunsInSeries();

int result = obj.computeRuns(51,0,96,44,70);

System.out.println(result);

}

public int computeRuns(int inn1, int inn2, int inn3, int inn4, int inn5){

//write your code here

int sum=inn1+inn2+inn3+inn4+inn5;

System.out.println("total runs of batsman in 5 matches"+sum);

return sum;

}

}

3. SecondToHours

Problem Statement

Given the time in number of seconds, find out how many hours have been completed

Sample Input #1

toHours(22125)

Sample Output #1

6

Sample Input #2

toHours(2511)

Sample Output #2

0

Sample Input #3

toHours(86208)

Sample Output #3

23

Code:

public class SecondToHours {

int result = obj.toHours(22125);

System.out.println(result);

}

return seconds/3600;

}

}

4.HundredsDigit

Problem Statement

Given a 4 digit number as input, find the value of its hundreds digit.

Sample Input #1

hundredsDigit(10567)

Sample Output #1

5

Sample Input #2

hundredsDigit(890)

Sample Output #2

8

Sample Input #3

hundredsDigit(41)

Sample Output #3

0

Code:

RequiredRunRate

Problem Statement

A team is chasing the target set in a one day international match. The objective is to

compute the required run rate. The following have provided as input: target, maxOvers,

currentScore, oversBowled.

Sample Input #1

runrateRequired(326,49,210,33)

Sample Output #1

7.25

Sample Input #2

runrateRequired(326,49,210,33)

Sample Output #2

7.25

Code:

public class RequiredRunRate {

RequiredRunRate obj = new RequiredRunRate();

double result = obj.runrateRequired(326,49,210,33);

System.out.println(result);

}

public double runrateRequired(int target, int maxOvers, int currentScore, int oversBowled){

double a=target-currentScore;

double b=maxOvers-oversBowled;

return a/b;

}

5. Make3Digit

Problem Statement

Given a digit as input, create a 3 digit number in which all the digits are the same as the input

digit.

Sample Input #1

make3DigitNum(4)

Sample Output #1

444

Sample Input #2

make3DigitNum(1)

Sample Output #2

111

Code:

- SyllabusUploaded byJennifer 8. Lee
- Learn Arduino With the ArnoUploaded byalexxmschool
- Oop Java Codes SummaryUploaded bySahil Khan
- GraphicUploaded byAdarsha Kharel
- C++PracticeSet-2.pdfUploaded byLakshmi Mysore
- Ph2150 NotesaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaUploaded bybbteenager
- i3_Maths_tutorial_[Wazhua.Com]Uploaded byvgfeefgv
- Hcl Quantitative AbilityUploaded byKalyan Sagar
- ReinforceUploaded byShipra Sharma
- MELJUN CORTES Introduction to C Programming CompleteUploaded byMELJUN CORTES, MBA,MPA
- PMS_API_eng_v1.8Uploaded byFarrukh Fiaz
- aUploaded byJoel Montoya
- tutorial1sp-141001003259-phpapp02Uploaded byAnugrah Pangeran
- Workshop 10 AUploaded byTooba Aamir
- New Microsoft Word Document (2)Uploaded byvarun1027
- c++ 25 exerciseUploaded byabrham yared
- ProgrammerGuide_V2.6Uploaded byguidoska88
- CRM UMLUploaded bySuresh Gutur
- Code is SsueUploaded byAnkit Kansal
- csc113-lab-2Uploaded byEbtisam Hamed
- Questions cUploaded bynarayantalk2u
- PixelUploaded byPriti Rathi
- lecture02-131117075204-phpapp02Uploaded byCarlos Estrada
- Sasken Placement Paper | Freshers ChoiceUploaded byfresherschoice
- Grade11Math.pdfUploaded byDuongHungDo
- Z13_GADD0929_07_SE_APPMUploaded byAndrew Paul
- CFP - ICCET 2011Uploaded byAbdulla Al Mamun
- 8275 NoticeUploaded byshreya
- Scheme_CS_2009-10_Main_III_IVUploaded byEr Rahul Porwal
- brochure 1Uploaded byapi-257335528

- MongoDB-CheatSheet-v1_0Uploaded bysj314
- mlkkkjUploaded byRavi Kumar
- PoC Proposal TemplateUploaded byHromit Prodigy
- dddddddddddddddUploaded byRavi Kumar
- AWS-Slides.pptxUploaded byTarun Chaudhary
- recipt-converted.docxUploaded byRavi Kumar
- FlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllUploaded byRavi Kumar
- dddddwqqqvbdUploaded byRavi Kumar
- Acids BuffersUploaded byJuanjo Garay Ortega
- nnnnnnnnnnnUploaded byRavi Kumar
- RE_PythonUploaded byRavi Kumar
- bigdatasparkdevcertificate-181119204028Uploaded byRavi Kumar
- Python for LinuxUploaded byRavi Kumar
- Image CenterUploaded byRavi Kumar
- image center.txtUploaded byRavi Kumar
- blog-postUploaded byRavi Kumar
- blog-post.txtUploaded byRavi Kumar
- Ubunto Hive Setup Instructions v4Uploaded byRavi Kumar
- HiveUploaded byRavi Kumar
- What is AndroidUploaded byRavi Kumar
- Star BurnUploaded byRavi Kumar
- New Text DocumentUploaded byRavi Kumar
- Full StackUploaded byRavi Kumar
- MIT6_0001F16_Lec1Uploaded byAnupEkbote
- Big Data Analytics%C2%A0Question Paper.pdfUploaded byRavi Kumar
- Print Order # 6100004858Uploaded byRavi Kumar
- Crysis Warhead ManualUploaded byRavi Kumar

- ArrowPontoon.pdfUploaded byCristian Farina
- How Do I Determine Bolt Torque for Flanged Connections_ _ GasketsUploaded byNataraj Mohan
- ATC Frost Security CatalogUploaded bynickelchow
- M1700_CE Controller ScadaUploaded byplopiess
- Mitsubishi Electric Zuba-DanUploaded bya_mitic
- Bump TestUploaded bytylerdurdane
- IS-3589 Steel Pipes for Water & SewageUploaded bynieav280
- Broadcast Channbel (BCCH) Update Procedure (SIB Contents)Uploaded byZahidRafique
- Ab Initio LC-DFT Study of Graphene, Multilayer Graphenes and Graphite 508Uploaded byrafel
- NEW APPROACH FOR DEVELOPING EPOXY-AMINE ADDUCTCURATIVE WITH MODIFIED EPOXY RESINSUploaded byvipin1222
- Thermite Welding Powder certificate.pdfUploaded byAmiableimpex
- D MegatronUploaded byanon_286274445
- VAC PUMP RSUploaded byAnonymous zwSP5gv
- Important Mcq-Automatic Control Systems _www.allexamreview.comUploaded byarijitlgsp
- MSX User - Vol 1 No 4 - Mar 1985Uploaded byBuleste
- Discharge Portable Toilet WasteUploaded byJunel Alapa
- 4. Cisco DA and AMI v01Uploaded bykapernikov
- ASE Migration to LinuxUploaded bycostai5402
- Chapter 2 - ResistorUploaded byKamelesh Anbalagan
- WW_20120901_Sep_2012Uploaded byAdrian Borsos
- as1090Uploaded byMANOJ KUMAR
- Flowable Fill BrochureUploaded bySajjad Anwar
- Proflex EF250VP EF450VP CartridgeUploaded byGabriel Duarte
- howhotUploaded byNicole Floyd
- Static and Rotary UPS TechnologyUploaded bySimon Condor
- A Major Update of X'Pert HighScore Plus.pdfUploaded byharuly
- Kks Handbook Edition 08Uploaded byDavid Bender
- Lab Report ExcelUploaded byEyQa PeYrak
- Material substitution.pdfUploaded byGigi Filote
- L14 Ultrasound(1)Uploaded byLinh Phan