This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(){ | |
int n ; | |
int sum ; | |
scanf("%d",&n) ; | |
int three = (n-1) / 3 ; // no of 3 multiples below n | |
int five = (n-1) / 5 ; // no of 5 multiples below n | |
int fifteen = (n-1) / 15 ; // no of 15 multiples below n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// problem at https://www.hackerrank.com/challenges/mini-max-sum | |
// Simply sort the elements and add the first 4 elements for min | |
// and the last 4 for the max | |
#include <math.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <assert.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem : https://www.hackerrank.com/challenges/grading/problem | |
#include <math.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <limits.h> | |
#include <stdbool.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. https://www.hackerrank.com/challenges/birthday-cake-candles?h_r=next-challenge&h_v=zen | |
2. https://www.hackerrank.com/challenges/apple-and-orange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<algorithm> | |
#include<string> | |
#include<vector> | |
#include<cmath> | |
#include<time.h> | |
using namespace std ; | |
int pow(int n, int k){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std ; | |
int main() { | |
int prime[501] ; | |
int n = 3 ; | |
int j = 1 ; | |
prime[1] = 2 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set logfile=log.txt | |
:main | |
echo 1.insert | |
echo 2.delete | |
echo 3.update | |
set /p opt=select an option: | |
if %opt%==1 GOTO insert |