Programming

620 Articles 12 Followers

Learning Factorials with Loop/Recursion @ Dcoder

Problem: If n is an integer greater than 0, n factorial (n!) is the product: n* (n-1) * (n-2) * ( n-3)… * By convention, 0! = 1. Write a Program to compute n Factorial(n!), where n is input.  Input: n is a positive integer Output: Output will be n fa...

Lochard 1 minute read 24 Jul 2023 0 comments $0.11

How many weeks @ Dcoder

Problem: A town in Death Valley has a water tank that contains 10,000 gallons of water. If there is no rain, calculate the number of weeks the water will last for an input weekly water usage. Input: Input contains positive integer n , which indicates...

Lochard 1 minute read 23 Jul 2023 0 comments $0.03

The shortest Path Algo(Simple) @ Dcoder

Problem: The Jones Trucking Company tracks the location of each of its trucks on a grid similar to an (x, y) plane. The home office is at location (0, 0). Read the coordinates of truck A and the coordinates of truck B and determine which is closer to...

Lochard 1 minute read 22 Jul 2023 0 comments $0.02

The BlackJack with conditions. @ Dcoder

Problem: Write a program to play a variety of BlackJack. In general, given two numbers, a and b, return their sum. If the sum is greater than 21, return 0, unless one of the numbers is 11. In such a case, the 11 should be 'converted' to a 1 to preven...

Lochard 1 minute read 21 Jul 2023 0 comments $0.04

Learning Prime numbers with Loop/Recursion @ Dcoder

Problem: Raja Beta is bad at maths, his teacher always complaints about him.Help him in his prime numbers homework. Input: Two space separated positive integer m and n Output: Print all prime numbers p such that m

Lochard 1 minute read 20 Jul 2023 0 comments $0.00

Let The Coding Games Begin

About the no code worry-site. The code was already written by webflow, everything basically templated. It's good for those who don't care too much about the details, otherwise you’d need some basic coding skills to refine the details to your liking....

Hermitworldwide 2 minute read 20 Jul 2023 0 comments $0.03

The light Switch @ Dcoder

Problem: There is a light bulb on the stairs, which has two switches. The light turns on if and only if one of them is on(binary 1) and other is off(binary 0).You are given combinations of these switch find whether the bulb glow or not? Input: Two bi...

Lochard 1 minute read 16 Jul 2023 0 comments $0.02

The Triangle Game @ Dcoder

Problem: Glin was doing his maths homework , Rick came to his house. As Glin is week at Maths, Rick decided to help him in his homework. They both stuck at a problem of Right Angle Triangle. You have to help them both in this problem. Input is a Stri...

Lochard 1 minute read 13 Jul 2023 2 comments $0.01

CodeWars C Kata - Double Char

DESCRIPTION: Given a string, you have to return a string in which each character (case-sensitive) is repeated once.   Examples (Input -> Output): * "String" -> "SSttrriinngg" * "Hello World" -> "HHeelllloo WWoorrlldd" * "1234!_ " -> "11223344!!__ " c...

Lochard 1 minute read 12 Jul 2023 0 comments $0.07

The War of Problem Setters @ Dcoder

Problem: Garry and Sharry are colleague, assuming they work at Dcoder. They are our Problem Setters.One day we decide to judge their work. Both were given an assignment to make some problems to display at Dcoder, and they were awarded points based on...

Lochard 1 minute read 10 Jul 2023 0 comments $0.01