forked from Aniket965/Hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30f40fe
commit f83fcea
Showing
6 changed files
with
9,909 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#include<stdio.h> | ||
int main() | ||
#include <stdio.h> | ||
char copy() | ||
{ | ||
int i; | ||
printf("Enter any number to print hello world"); | ||
int j=scanf("%d",&i); | ||
printf("The number is: %d",j); | ||
printf("Welcome to the worlld of C programming"); | ||
printf("Hello World\n"); | ||
} | ||
int main() | ||
{ | ||
copy(); | ||
return 0; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,13 @@ | ||
def bubbleSort(arr): | ||
n = len(arr) | ||
|
||
# Traverse through all array elements | ||
for i in range(n): | ||
|
||
# Last i elements are already in place | ||
for j in range(0, n-i-1): | ||
|
||
# traverse the array from 0 to n-i-1 | ||
# Swap if the element found is greater | ||
# than the next element | ||
if arr[j] > arr[j+1] : | ||
arr[j], arr[j+1] = arr[j+1], arr[j] | ||
|
||
# Driver code to test above | ||
arr = [] | ||
num1 = int(input('enter the value\n')) | ||
num2 = int(input('enter the value\n')) | ||
num3 = int(input('enter the value\n')) | ||
num4 = int(input('enter the value\n')) | ||
num5 = int(input('enter the value\n')) | ||
import random | ||
|
||
#For putting the values in list arr:- | ||
arr.append(num1) | ||
arr.append(num2) | ||
arr.append(num3) | ||
arr.append(num4) | ||
arr.append(num5) | ||
def bubbleSort(lists): | ||
for j in range(0, len(lists)-1-i): | ||
if(lists[j]>lists[j+1]): | ||
lists[j+1], lists[j] = lists[j], lists[j+1] | ||
|
||
lists = random.sample(range(0, 5001), 5000) | ||
print(lists) | ||
|
||
|
||
bubbleSort(arr) | ||
|
||
print ("Sorted array is:") | ||
for i in range(len(arr)): | ||
print ("%d" %arr[i]), | ||
bubbleSort(lists) | ||
|
||
print(lists) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
print("Hello, World!") | ||
num=int(input("enter a number")) | ||
if(num==1): | ||
print("Hello, World!") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
print("Hello, World!") | ||
num=int(input("enter a number")) | ||
if(num==1): | ||
print("Hello, World!") |
Oops, something went wrong.