Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
17 changes: 17 additions & 0 deletions adarsh1498/even.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <iostream>
using namespace std;

int main()
{
int n;

cout << "Enter an integer: ";
cin >> n;

if ( n % 2 == 0)
cout << n << " is even";
else
cout << n << " is odd";

return 0;
}
16 changes: 16 additions & 0 deletions adarsh1498/sum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>
using namespace std;

int main()
{
int N1,N2,result;

cout << "Enter two integers: ";
cin >> N1 >> N2;

result = N1 + N2;

cout << N1 << " + " << N2 << " = " << result;

return 0;
}
1 change: 1 addition & 0 deletions araanbranco/helloberfun.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Hello Hacktoberfun')
5 changes: 5 additions & 0 deletions araanbranco/sum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function sum (a, b) {
return a + b
}

console.log(sum(5,4))
9 changes: 9 additions & 0 deletions bgail/sum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def sum(x,y):
return x+y;
def main():
x = int(input('Enter first num: '))
y = int(input('Enter second num: '))
print(sum(x,y))

if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions captainswain/helloberfun.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?php

echo "Hello Hacktoberfun";
echo "What is this";
15 changes: 15 additions & 0 deletions captainswain/sum.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include<stdio.h>
#include<stdlib.h>

int sum(int a ,int b){

return a+b;
}

int main(){
int a,b,c;
printf("Enter 2 numbers\n");
scanf("%d%d",&a,&b);
printf("\nSum is %d",sum(a,b));
return 0;
}
10 changes: 10 additions & 0 deletions casper/sum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /usr/bin/env python

def sum(x, y):
return x + y

if __name__ == "__main__":
a = float(input("First number : "))
b = float(input("Second number : "))

print(sum(a,b))
3 changes: 3 additions & 0 deletions emmandev/hacktoberfun.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

echo "Hello Hacktoberfun";
5 changes: 5 additions & 0 deletions emmandev/sum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

function sum($x, $y) {
return $x + $y;
}
13 changes: 13 additions & 0 deletions even-odd/evenodd.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//created by- Siddharth Saurabh (https://github.com/siddhartthecoder)
import java.util.*;
class evenodd {
public static void main(String args[]) throws Exception {
Scanner sc = new Scanner(System.in);
System.out.println("Enter your number:");
int n = sc.nextInt();
if(n%2==0)
System.out.println(n+" is even");
else
System.out.println(n+" is odd");
}
}
9 changes: 9 additions & 0 deletions geotrieu/sum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>

using namespace std;
int main() {
int num1, num2;
cin >> num1;
cin >> num2;
cout << (num1 + num2);
}
1 change: 1 addition & 0 deletions gmrsagar/helloberfun.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Hello Hacktoberfun')
1 change: 1 addition & 0 deletions hacktoberfun
Submodule hacktoberfun added at 824bec
4 changes: 4 additions & 0 deletions indobits /sum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def sum(a,b):
print(a+b)

sum(1,2)
12 changes: 12 additions & 0 deletions kbc/sum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>
using namepsace std;

int main(){
int a,b;
cout<<"Enter a number: ";
cin>>a;
cout<<"Enter another number: ";
cin>>b;
cout<<"sum is "<<a+b<<endl;
return 0;
}
3 changes: 3 additions & 0 deletions kbc/sum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = int(input('Enter a number: ')
b = int(input('Enter another number: ')
print('sum is',a+b)
6 changes: 6 additions & 0 deletions maanasvohra/helloberfun.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include<stdio.h>
int main()
{
printf("Hello Hacktoberfun");
return 0;
}
13 changes: 13 additions & 0 deletions nghminh163/even_odd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import "fmt"

func main() {
var a int
fmt.Scan(&a)
if a%2 == 0 {
fmt.Print("The number you entered is even")
} else {
fmt.Print("The number you entered is odd")
}
}
14 changes: 14 additions & 0 deletions nghminh163/odd-even.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include<stdio.h>
int main() {

int n;
printf("Enter a number: ");
scanf("%d",&n);
if(1&n)
printf("%d is an odd number\n",n);
else
printf("%d is an even number\n",n);

return 0;

}
17 changes: 17 additions & 0 deletions nghminh163/return-odd-even.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package main

import "fmt"

func main(){

fmt.Print("Input number- ")
var number int
fmt.Scanln(&number)


if(number%2!=0){
fmt.Println(number,"is odd number")
}else{
fmt.Println(number,"is even number")
}
}
11 changes: 11 additions & 0 deletions nghminh163/sum.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package main

import "fmt"

func sum(a, b int) int{
return a+b
}

func main() {
fmt.Print(sum(1,2))
}
70 changes: 70 additions & 0 deletions robot/helloberfun.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint


curses.initscr()
win = curses.newwin(20, 60, 0, 0)
win.keypad(1)
curses.noecho()
curses.curs_set(0)
win.border(0)
win.nodelay(1)

key = KEY_RIGHT
score = 0

snake = [[4,10], [4,9], [4,8]]
food = [10,20]

win.addch(food[0], food[1], '*')

while key != 27:
win.border(0)
win.addstr(0, 2, 'Score : ' + str(score) + ' ')
win.addstr(0, 27, ' SNAKE ')
win.timeout(150 - (len(snake)/5 + len(snake)/10)%120)

prevKey = key
event = win.getch()
key = key if event == -1 else event


if key == ord(' '):
key = -1
while key != ord(' '):
key = win.getch()
key = prevKey
continue

if key not in [KEY_LEFT, KEY_RIGHT, KEY_UP, KEY_DOWN, 27]:
key = prevKey


snake.insert(0, [snake[0][0] + (key == KEY_DOWN and 1) + (key == KEY_UP and -1), snake[0][1] + (key == KEY_LEFT and -1) + (key == KEY_RIGHT and 1)])


if snake[0][0] == 0: snake[0][0] = 18
if snake[0][1] == 0: snake[0][1] = 58
if snake[0][0] == 19: snake[0][0] = 1
if snake[0][1] == 59: snake[0][1] = 1


if snake[0] in snake[1:]: break


if snake[0] == food:
food = []
score += 1
while food == []:
food = [randint(1, 18), randint(1, 58)]
if food in snake: food = []
win.addch(food[0], food[1], '*')
else:
last = snake.pop()
win.addch(last[0], last[1], ' ')
win.addch(snake[0][0], snake[0][1], '#')

curses.endwin()
print("\nScore - " + str(score))
print("http://bitemelater.in\n")
7 changes: 7 additions & 0 deletions shashi/sort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#call this function with a list and it will return a sorted list

def sort(a):
return sorted(a)

# testing
print(sort([4,5,8,5,2,2,3]))
10 changes: 10 additions & 0 deletions shuvikash/helloberfun.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import java.io.*;
import java.util.*;

class hactoberfun
{
public static void main (String[] args)
{
System.out.println("Hello Hacktoberfun");
}
}
Binary file added sort.cpp/a.out
Binary file not shown.
24 changes: 24 additions & 0 deletions sort.cpp/sort.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int size;
vector<long long int> v;
cout<<"Please enter the size of the array:- "<<endl;
cin>>size;
cout<<"Please enter the numbers one by one:-"<<endl;
for(long long int i=0;i<size;i++)
{
long long int value;
cin>>value;
v.push_back(value);
}
sort(v.begin(),v.end());
cout<<"Array in sorted order is:- ";
for(long long int i=0;i<size;i++)
{
cout<<v[i]<<" ";
}
cout<<endl;
return 0;
}
16 changes: 16 additions & 0 deletions sum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>
using namespace std;

int main()
{
int N1,N2,result;

cout << "Enter two integers: ";
cin >> N1 >> N2;

result = N1 + N2;

cout << N1 << " + " << N2 << " = " << result;

return 0;
}
12 changes: 12 additions & 0 deletions sum__two__numbers/sum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int first,second;
cout<<"Please enter the first number:- "<<endl;
cin>>first;
cout<<"Please enter the second number:- "<<endl;
cin>>second;
cout<<"The sum of the two number is:- "<<first+second<<endl;
return 0;
}
15 changes: 15 additions & 0 deletions vmsantos/even_odd.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdio.h>

void main(){
printf("\n*****Check wether a number is even or odd*****\n\n\n");

int a;

printf("Enter a number:\n");
scanf("%d", &a);

if (a % 2 == 0)
printf("--->The number you entered is even\n");
else
printf("--->The number you entered is odd\n");
}
6 changes: 6 additions & 0 deletions vmsantos/helloberfun.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int main (){
printf("Hello Hacktoberfun\n");
return 0;
}
Loading