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
@PurpleBooth
PurpleBooth / README-Template.md
Last active March 11, 2025 16:38
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

#include <stdio.h>
int main(void)
{
int number = 0;
int digit = 0;
int sum = 0;
printf("Enter the five digit number : ");
scanf("%d", &number);
@adi0603
adi0603 / uberhigheringchallenge.c
Last active June 21, 2019 20:06
Week 3 Code - Uber
//
// Created By Aditya Pandey BCA
//
#include <stdio.h>
void displayArray(int ar[],int size); //declaring array printing function
int main(void) {
int size = 5; //giving size of array
int old[size],new[size],j,i;
printf("Enter numbers in array\n");
#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);
#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 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 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){
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){
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 number:\n");
scanf("%d", &a);
printf("please enter the number:\n");
scanf("%d", &b);
c = a > b ? a : b;