What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-16 17:07:06
Given the first 2 terms A and B of an Arithmetic Series, tell the Nth term of the series.
#include <stdio.h> int nth_ap(int a, int d, int n) { // using formula to find the // Nth term t(n) = a(1) + (n-1)*d return (a + (n - 1) * d); } //main function int main() { // starting number  ... Add solution -
Java 2021-10-15 03:25:08
Java program to print prime numbers in a given range
// Java program to print prime numbers in a given range public class PrimeNumberRangeDemo { public static void main(String[] args) { int lowerRange = 10, higherRange = 50; while(lowerRange < higherRange) { boolean ... Add solution -
Java 2021-10-13 03:19:08
Floyd's triangle star pattern in java
// Floyd's triangle star pattern in java import java.util.Scanner; public class FloydTriangleStars { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the number of rows of floy... Add solution -
Java 2021-10-12 01:08:06
Floyd's triangle number pattern using while loop in java
// Floyd's triangle number pattern using while loop in java import java.util.Scanner; public class FloydTriangleWhileLoop { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the... Add solution
Best helpers
Ranking is empty