Skip to content

Instantly share code, notes, and snippets.

View dbc2201's full-sized avatar
💻
I may be slow to respond.

Divyansh Bhardwaj dbc2201

💻
I may be slow to respond.
View GitHub Profile
@sergeyzenchenko
sergeyzenchenko / russia-ddos.md
Last active April 16, 2024 15:32
Russia DDOS list
@Shivamy2
Shivamy2 / solution
Last active January 25, 2021 05:40
// In Java
import java.util.*;
class Question1 {
// Please try not to change anything in this method.
public static void main(String[] args) {
int[] numbers = new int[15];
addRandomNumbers(numbers);
System.out.println(Arrays.toString(numbers));
System.out.println(findPairsByList(numbers, 10));
@dbc2201
dbc2201 / FactorialCalculator.java
Last active February 15, 2024 10:17
for insanely large numbers
/*
* Created by IntelliJ IDEA Ultimate, 2020
* User: dbc2201
* Date: 16/01/20
* Time: 8:52 AM
*/
package recursion;
import java.math.BigInteger;
#include<stdio.h>
int main(void){
int a = 0;
int b = 0;
int c = 0;
printf("please enter the number:\n");
scanf("%d", &a);
printf("please enter the number:\n");
scanf("%d", &b);
c = a > b ? a : b;
#include<stdio.h>
int main(void){
int inputNumber = 0;
printf("please enter number:");
scanf("%d", &inputNumber);
(inputNumber % 2 == 0) ? printf("number is even", inputNumber) : printf("number is odd", inputNumber);
return 0;
}
#include<stdio.h>
int main(void){
int a = 0;
int b = 0;
int c = 0;
printf("please enter the value of a:\n");
scanf("%d", &a);
printf("please enter the value of b:\n");
scanf("%d", &b);
printf("please enter the value of c:\n");
#include<stdio.h>
int main(void){
float fahrenheit = 0.0f;
float celsius = 0.0f;
printf("please enter the value of fahrenheit :\n");
scanf("%f", &fahrenheit);
celsius = (fahrenheit - 32) * 5 / 9;
printf("Fahrenheit To Celsius is = %.2f\n", celsius);
return 0;
}
#include<stdio.h>
int main (void)
{
float kilometre = 0.0f;
printf("please enter the value of kilometre:\n");
scanf("%f", &kilometre);
float metre = 0.0f;
float feet = 0.0f;
float centimetre = 0.0f;
metre = kilometre * 1000.0f;
#include<stdio.h>
int main(void){
float basic_salary = 0.0f;
float hra = 0.0f;
float ta = 0.0f;
printf("please enter your basic salary:\n");
scanf("%f", &basic_salary);
hra = (40.0f / 100.0f) * basic_salary;
ta = (20.0f / 100.0f) * basic_salary;
printf("Basic salary:%.2f\n", basic_salary);
#include<stdio.h>
int main(void){
float principle = 0.0f;
float time = 0.0f;
float rate = 0.0f;
float si = 0.0f;
printf("please enter the principle amount in :\n");
scanf("%f", &principle);
printf("please enter the time duration in years ex = 4 / 5.5 etc:\n");
scanf("%f", &time);