Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

updated 7 files #4782

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 001/ho.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("ഹലോ വേൾഡ് "hello world"")
9 changes: 9 additions & 0 deletions 01/thenga.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

പ്രയോഗം വിളി(പേര്) {
മടക്കം "കമോണ്ട്രാ " + പേര് + "!";
};
വിളി("മഹേഷേ");




23 changes: 23 additions & 0 deletions ASPECTJ/Program
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# AspectJ uses a Java-like syntax.

// HelloWorld.java
public class HelloWorld {
public static void say(String message) {
System.out.println(message);
}

public static void sayToPerson(String message, String name) {
System.out.println(name + ", " + message);
}
}

// MannersAspect.java
public aspect MannersAspect {
pointcut callSayMessage() : call(public static void HelloWorld.say*(..));
before() : callSayMessage() {
System.out.println("Good day!");
}
after() : callSayMessage() {
System.out.println("Thank you!");
}
}
4 changes: 4 additions & 0 deletions ArnoldC/hello_world.arnoldc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
IT'S SHOWTIME
TALK TO THE HAND "hello world"
TALK TO THE HAND "Woah let's do it"
YOU HAVE BEEN TERMINATED
6 changes: 4 additions & 2 deletions C ++/HELLO WORLD !!.CPP
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// CODING IN TURBO C++ //
** PRINTING OF �HELLO WORLD !!� **

** PRINTING OF “HELLO WORLD !!” **

( USING LOWER & UPPER TRAINGLE OF A MATRIX)

#include<iostream.h>
Expand All @@ -24,7 +26,7 @@ void main()
}
cout<<" ";
}
cout<<" HELLO WORLD !! \n";
cout<<"\n HELLO WORLD !! \n";
cout<<" ";
for(i=0;i<r;i++)
{ for(j=0;j<c;j++)
Expand Down
8 changes: 8 additions & 0 deletions C ++/Hello Earth.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include<iostream>
using namespace std;

int main ()
{
cout<<"Hello Earth";
return 0;
}
8 changes: 8 additions & 0 deletions C ++/Hello-Worldd!!
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <iostream>
using namespace std;

int main()
{
cout<<"Hello World";
return 0;
}
12 changes: 12 additions & 0 deletions C ++/Hello_world_by_Shashwat-Garg.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Shashwat Garg
* B16034
* IIT Mandi
*/

#include<iostream>
using namespace std;
int main(){
cout<<"Hello World from Shashwat-Garg ! :)\n";
return 0;
}
2 changes: 1 addition & 1 deletion C ++/Mars_Exploration_Hackerrank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(){
i++;
}
}
i--;
i-=1;
}
cout << count;
return 0;
Expand Down
8 changes: 8 additions & 0 deletions C ++/hello_hacktoberfest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include<iostream>

using namespace std;

int main(){
cout << "Hello Hacktoberfest" <<endl;
return 0;
}
2 changes: 1 addition & 1 deletion C ++/hello_swar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ using namespace std;

int main()
{
cout << "Hello World !!!" << endl;
cout << "Hello World !!!\n" << endl;
return 0;
}
8 changes: 8 additions & 0 deletions C ++/hello_world.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//printing 100 time hello world!
#include<iostream>
using namespace std;
int main(){
for(int i=0;i<100;i++)
cout<<"Hello world!\n";
return 0;
}
24 changes: 24 additions & 0 deletions C Language/c program to implement ceaser cipher algorithm.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>

int main()
{
char array[100], cipher[100];
int c=0, x=0, y=0;
int z;
printf("This Program will encrypt according to your needs\n");
printf("Enter the cipher key\n");
scanf("%d",&z);
printf("Enter the sentence");
while((c=getchar()) != '\n')
{
array[x++]=(char)c;
cipher[y++]=(char)(c+z);
}

array[x]=0;
cipher[y]=0;

printf("%s\n",cipher);

return 0;
}
62 changes: 62 additions & 0 deletions C Language/calculate height using struc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
struct height{
int m;
int cm;
};
int main(){
struct height h1,h2,h3;
int n=0,temp1,temp2,temp3;
printf("enter h1:\n");
scanf("%d%d",&h1.m,&h1.cm);
printf("enter h2:\n");
scanf("%d%d",&h2.m,&h2.cm);
printf("enter 1 to add 2 heights and display result\nenter 2 to subtract 2 heights and display result\nenter 3 to display both the heights in meters\nenter 4 to exit\n");
temp1=h1.m*100+h1.cm;
temp2=h2.m*100+h2.cm;
scanf("%d",&n);
printf("%d",n);
while(n!=4){
//switch condition
switch(n){
case 1:
h3.m=h1.m+h2.m;
h3.cm=h1.cm+h2.cm;
while(h3.cm>100)
{
h3.m=h3.m+1;
h3.cm=h3.cm-100;
}
printf("after addition height will be : %d m %d cm\n",h3.m,h3.cm);
break;

case 6:
printf("fuhf");
if(temp1>temp2)
temp3=temp1-temp2;
else
temp3=temp2-temp1;
while(temp3>100){
h3.m=h3.m+1;
h3.cm=h3.cm-100;
}
printf("after subtraction height will be : %d m %d cm\n",h3.m,h3.cm);
break;


case 3:
printf("%d %d\n",h1.m,h1.cm);
printf("%d %d\n",h2.m,h2.cm);
break;

case 4:
return 0;
break;

default:
printf("something wrong is entered\n");
}
scanf("%d",&n);
printf("%d",n);
}
return 0;
}

33 changes: 33 additions & 0 deletions C#/PalindromeRecursive.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Linq;

namespace RecursivePalindrome
{
class Program
{
private static void Main()
{
bool another;
Console.WriteLine("This is aRecursive Palindrome Test");
Console.WriteLine("To exit please use Ctrl+C");

do
{
Console.WriteLine("Please enter a possible palindrome: ");
var posPalin = Console.ReadLine()?.Trim().ToLower();
Console.WriteLine(IsPalindrome(posPalin)
? $"{posPalin} is a palindrome"
: $"{posPalin} is not a palindrome");
Console.WriteLine("Do you want to test another palindrome? (y/n)");
another = (bool) Console.ReadLine()?.Trim().ToLower().Equals("y");
} while (another);
}

private static bool IsPalindrome(string s)
{
if (s.Length == 0 || s.Length == 1) return true;

return s.ToCharArray().First() == s.ToCharArray().Last() && IsPalindrome(s.Substring(1,s.Length-2));
}
}
}
12 changes: 12 additions & 0 deletions C#/WelcomeInBrazil
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
namespace WelcomeInBrazil
{
class Program
{
static void Main(string[] args)
{
Console.Write("Here's a mess, are you sure you want to come in?");
Console.ReadKey();
}
}
}
5 changes: 2 additions & 3 deletions C#/helloworld.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System;

namespace Hello
namespace hello
{
class Program
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.ReadKey();
}
}
}
42 changes: 42 additions & 0 deletions C++/DynamicProgramming/Hosoya_triangle.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// CPP Program to print Hosoya's
// triangle of height n.
#include <bits/stdc++.h>
using namespace std;

int Hosoya(int n, int m) {
// Base case
if ((n == 0 && m == 0) ||
(n == 1 && m == 0) ||
(n == 1 && m == 1) ||
(n == 2 && m == 1))
return 1;

// Recursive step
if (n > m)
return Hosoya(n - 1, m)
+ Hosoya(n - 2, m);

else if (m == n)
return Hosoya(n - 1, m - 1)
+ Hosoya(n - 2, m - 2);

else
return 0;
}

// Print the Hosoya triangle of height n.
void printHosoya(int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++)
cout << Hosoya(i, j) << " ";

cout << endl;
}
}

// Driven Program
int main() {
int n = 5;
printHosoya(n);
return 0;
}
34 changes: 34 additions & 0 deletions C++/DynamicProgramming/KnapSack_problem.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// A Dynamic Programming based solution for 0-1 Knapsack problem
#include<stdio.h>

// A utility function that returns maximum of two integers
int max(int a, int b) { return (a > b)? a : b; }

// Returns the maximum value that can be put in a knapsack of capacity W
int knapSack(int W, int wt[], int val[], int n) {
int i, w;
int K[n+1][W+1];

// Build table K[][] in bottom up manner
for (i = 0; i <= n; i++) {
for (w = 0; w <= W; w++) {
if (i==0 || w==0)
K[i][w] = 0;
else if (wt[i-1] <= w)
K[i][w] = max(val[i-1] + K[i-1][w-wt[i-1]], K[i-1][w]);
else
K[i][w] = K[i-1][w];
}
}

return K[n][W];
}

int main() {
int val[] = {60, 100, 120};
int wt[] = {10, 20, 30};
int W = 50;
int n = sizeof(val)/sizeof(val[0]);
printf("%d", knapSack(W, wt, val, n));
return 0;
}
Loading