Skip to content

Instantly share code, notes, and snippets.

View SametSahin10's full-sized avatar
🏠
Working from home

SametSahin10

🏠
Working from home
View GitHub Profile
@SametSahin10
SametSahin10 / printNumbers.c
Created March 13, 2018 12:59
C program to print all the numbers in a char array.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main() {
char sentence[100];
int numberOfNumbers = 0;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char name[50];
int numberOfElementsOfArray;
#include <stdio.h>
#include <stdlib.h>
int main() {
int n;
printf("Enter the number of x and y values: \n");
scanf("%d", &n);
while True:
print("Options:")
print("Enter 'add' to add two numbers")
print("Enter 'subtract' to subtract two numbers")
print("Enter 'multiply' to multiply two numbers")
print("Enter 'divide' to divide two numbers")
print("Enter 'quit' to end the program")
user_input = input(": ")
@SametSahin10
SametSahin10 / solution.py
Last active December 2, 2018 22:17
My Solution
points = 400 # use this as input for your submission
# establish the default prize value to None
prize = None
# use the points value to assign prizes to the correct prize names
if points <= 50:
prize = "wooden rabbit"
@SametSahin10
SametSahin10 / solution1.py
Last active December 2, 2018 22:17
Original Solution
points = 174
points = 174 # use this input when submitting your answer
# set prize to default value of None
prize = None
# use the value of points to assign prize to the correct prize name
if points <= 50:
prize = "wooden rabbit"
public class JavaApplication105 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
JFrame frame = new JFrame("Example");
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
private readonly static string DBNAME = "Bonarego.db";
public DataBase()
{
CreateDataBase();
}
public static string documentsFolder()
{
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for i in range(len(a)):
if a[i] < 5:
print(a[i])
name = input("What's your name?\n")
age = int(input("How old are you?\n"))
message = "You will turn 100 years old in {}".format(2019 + (100 - age))
print(message)