Skip to content
Programming is like sex. One mistake and you have to support it for the rest of your life.
FcukTheCode

Harmonic Number in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Print the sum of nth harmonic number: 1/1 + 1/2 + … + 1/n. Note: Use Double Data type and String.format("%.02f",…

Continue ReadingHarmonic Number in Java …ftc

Number Pattern 111111 in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Write a program to print following outputs. 1111111111112211113331114444115555516666667777777 Input: 7 Output: 1111111 1111122 1111333 1114444 1155555 1666666 7777777 import java.io.*; import…

Continue ReadingNumber Pattern 111111 in Java …ftc

Conversion from binary to decimal in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Java Program to convert from binary to decimal number. Input: BINARY = 0010 Output: DECIMAL = 2 import java.io.*; import java.util.*;…

Continue ReadingConversion from binary to decimal in Java …ftc

Swap numbers by multiplication and division in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Swapping two numbers by multiplication and division Java Program to Swap two numbers by using division and multiplication. Input: 56 32…

Continue ReadingSwap numbers by multiplication and division in Java …ftc

Conversion from Octal to hexadecimal in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Java Program to convert from octal to hexadecimal number. Input: Octal: 15 Output: Hexadecimal: d import java.io.*; import java.util.*; public class…

Continue ReadingConversion from Octal to hexadecimal in Java …ftc

Many people think about their height in feet and inches [Java]…FTC

  • Post category:Java
  • Post comments:0 Comments

Many people think about their height in feet and inches, even in some countries that primarily use the metric system. Write…

Continue ReadingMany people think about their height in feet and inches [Java]…FTC

Area of pentagon in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Write a program that prompts the user to enter the length from the center of a pentagon to a vertex and…

Continue ReadingArea of pentagon in Java …ftc

Calculate energy to heat water in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program…

Continue ReadingCalculate energy to heat water in Java …ftc

Units of Time days,hours,min to seconds in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Create a program that reads a duration from the user as a number of days, hours, minutes, and seconds. Compute and…

Continue ReadingUnits of Time days,hours,min to seconds in Java …ftc

Celsius to Fahrenheit [Python] …ftc

  • Post category:Python
  • Post comments:0 Comments

Write a program to Convert the temperature from Celsius to Fahrenheit. Input: Celsius = 0 Output: Fahrenheit = 32 F Celsius…

Continue ReadingCelsius to Fahrenheit [Python] …ftc

Get deposit to recycle bottle in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

In many jurisdictions a small deposit is added to drink containers to encourage people to recycle them. In one particular jurisdiction,…

Continue ReadingGet deposit to recycle bottle in Java …ftc

BMI (Body Mass Index) in Java …ftc

  • Post category:Java
  • Post comments:0 Comments

Write a program that computes the body mass index (BMI) of an individual. Your program should begin by reading a height…

Continue ReadingBMI (Body Mass Index) in Java …ftc

Assignment Operator Example in Java

  • Post category:Java
  • Post comments:0 Comments

Sneha got a single integer as an input , and her task to perform all assignment operations in with the given…

Continue ReadingAssignment Operator Example in Java

Convert feet into meters in Java ..FTC

  • Post category:Java
  • Post comments:0 Comments

Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305…

Continue ReadingConvert feet into meters in Java ..FTC

Finding runway length needed for aeroplane in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Given take-off speed v and an airplane acceleration a, you can compute the minimum runway length needed for an airplane to…

Continue ReadingFinding runway length needed for aeroplane in Java …FTC

Julius Caesar’s Cipher Java program

  • Post category:Java
  • Post comments:0 Comments

Julius Caesar protected his confidential information by encrypting it in a cipher. Caesars cipher rotated every letter in a string by…

Continue ReadingJulius Caesar’s Cipher Java program

Pronic Number in Java …fcukthecode.com

  • Post category:Java
  • Post comments:0 Comments

A pronic number is a number which is the product of two consecutive integers, that is, a number of the form…

Continue ReadingPronic Number in Java …fcukthecode.com

Power of 2 in Java …fcukthecode.com

  • Post category:Java
  • Post comments:0 Comments

Write a program that takes a command-line argument n and prints a table of the powers of 2 that are less…

Continue ReadingPower of 2 in Java …fcukthecode.com

Palindrome numbers in Java …fcukthecode

  • Post category:Java
  • Post comments:0 Comments

Palindromes date back at least to 79 AD, as a palindrome was found as a graffito at Herculaneum, a city buried…

Continue ReadingPalindrome numbers in Java …fcukthecode

PATTERNS – L5 (Numbers pattern) in Java

  • Post category:Java
  • Post comments:0 Comments

Write a java program to display the following patterns. Input: 7 Output: 7 6 5 4 3 2 1 7 6…

Continue ReadingPATTERNS – L5 (Numbers pattern) in Java
  • Go to the previous page
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 18
  • Go to the next page
Copyright - OceanWP Theme by OceanWP