Wednesday, July 23, 2014

Scanning Variables and Building a Besic Calculator

Program:

import java.util.Scanner;
public class applles{
public static void main(String args[]){
Scanner moni = new Scanner(System.in);
double fnum,snum,answer;
System.out.println("enter first number: ");
fnum = moni.nextDouble();
System.out.println("enter the Second number: ");
snum=moni.nextDouble();
answer=fnum+snum;
System.out.println(answer);
}
}

Screenshots:

Program




output


Scan In Java Program

Program:

import java.util.Scanner;
public class input {
public static void main(String args[]){
Scanner moni = new Scanner(System.in);
System.out.println(moni.nextLine());
}

}

Screenshots:

Program


Output


Print Character Variable In java

Program:

public class appler {
public static void main(String args[]){
char moni='A';

System.out.println(moni);
}
}

Screenshots:

Program



Output


Scan Variable In Java

Program:

import java.util.Scanner;
public class apple{
public static void main(String args[]){
Scanner moni=new Scanner(System.in);
double man,woman;
man=moni.nextDouble();
woman=moni.nextDouble();
if(man!=woman && man<=woman){
System.out.println("man woman k biye korte parbe");
}else{
System.out.println("man woman k biye korte parbe na");
}
}
}
Screenshots:

Program


Output


The Simple "Hello World" Program

Program:

class apples{
public static void main(String args[]){
System.out.println("Hello world!");
}

}

Screenshots:

Program



The Output


Switch Statement

Program:

import java.util.Scanner;
public class appple{
public static void main(String args[]){
Scanner moni=new Scanner(System.in);
int age;
age=moni.nextInt();
switch (age){
case 1:
System.out.println("The number is not large");
break;
case 2:
System.out.println("Here is the large number");
break;
default:
System.out.println("There is no lartge number");
}
}
}

Screenshots

Here is the program


After scan 9 then the output of the program


Tuesday, July 15, 2014

Run Java Program On Computer

Now I am going to show you how to run a java program on your computer.It is by command promote on your computer.You can run any kind of java program by program editor or any software or something like that.Here I want to show you "How to run a java program without a program editor or software".So,remain with me and follow my instructions.

I'm not going to tell you about the syntax of the java program.I want to show simply run java program with cmd.

1.At first you have to open a text editor like notepad or notepad++.So,open that.
2.Click file>save as and save that file in C drive in the folder any name such as test named youtube.java or anything else.It must be with .(dot) java extension file.Because it is important for java program.
3.Now write a simple hello world java program like it.

4.
class apples{
public static void main(String args[]){
System.out.println("hello world");
}
}
Here in this program what happened that I will show you later.I want to show you just "How to run a java program without a program editor or software".

5.Then save it(cntr+S).
6.After that open cmd and write the instructions below and press enter.
cd \ >dir > cd test >dir > javac youtube.java > dir > java.apples.

7.Write one by one and press enter.Then you can see the last output "Hello world" or "my name is khan"

Here is some screenshots for your help.
                                                                     
Screenshots

Step one

Step two


Step three


Step four


Step five


Step six


Step seven


Step eight



So in this way you can run a java program with cmd.So,if the instructions are helpful to you then please comment and subscribe.

Download And Install Code::Blocks

Code::Blocks: It is free open source.C,C++ and fortran IDE built to meet the most demanding needs of its users.The code::blocks is designed to be very extensible and fully configurable.

Finally an IDE with all the features you need having a consistent look, feel and operation across platforms

It is built on a plugin framework.Code::Blocks can be extended with plugins.Any kind of functionality can be added by installing /coding a plugin.For instance, compiling and debugging functionality is already provided by plugins!

Special credit go to dramar for his great work on the fortranproject plugin.

This is a compiler.So,you can run any C or C++ program.I hope  you enjoy IT.

Now I am going to show you "how to download and install Code::Blocks".So, Follow me.

1.Go to this download link.
2.Then go to downloads menu.
3.After that go to "download the binary release".
4.For windows you have to download the file which shown for windows(32 bit or 64 bit) and others for others.
5.After download the code blocks.then install it.

Here is some screenshots for your help.So,follow the screenshots below.

DOWNLOAD LINK

                                                                    Step One


Step Two

Step Three
                                        

Sunday, July 13, 2014

Setting Java Compiler on Computer

Follow the instructions and screenshots to set java compiler on your computer.

At first go to the start menu on your computer and click the run button.Then write cmd in the search space.Next you can see the command dialogue box.There you have to write javac for search java compiler.But there you will see "javac is not recognized".

For that reason there is no java compiler set in your computer.So,you have to set java compiler on your computer.So that you can compile any kind of java program.

So after installing the JDK(java development kit),follow me.
1.First go to C drive or where you install the JDK on "my computer".
2.Then go to program files.
3.After that go to java folder.
4.Next you have to go jdk folder.
5.Go to the bin folder.
6.So,after going to that folder you have to right click on any file under that folder and click the properties.
7.Copy the location(ex:C:\Program Files\Java\jdk1.8.0_05\bin) from the dialogue box.
8.Go to my computer properties.And go to advance system setting.
9.Then click environment variable.
10.After that a new dialogue box appeared.Then you have to click New button and paste the location with the name "path".At last press ok, ok, ok and ok.
11.Then again go to run and write cmd.
12.Then in cmd dialogue box write javac and press enter.

In this way you can set java compiler in your computer

Here is some screenshots for your help.
Screenshots

Step one
Step two


Step three


Step four

Step five

Step six

Step seven

Step eight

Step nine

Step ten

Step eleven

Step twelve


Step thirteen


Downloading and Installing JDK

Go ahead and open the internet browser.Go to this link.Then go to downloads menu with java development tool.There you find java JDK that is "java development kit".Please download that first.

Of course you have to download the exe file.So,double click and install that file on C drive.Some screenshots are given below.Follow the instructions and install the file.For your help here also given red icon.

DOWNLOAD LINK

Screenshots

Go to downloads and java for developers link.
Then click the java icon.
Accept the agreement.
Download the file for your windows 64 bit or 32 bit operating system.


Saturday, July 12, 2014

Print Hello World

#include<stdio.h>
int main()
{
        printf("hello world");
        return 0;
}

Wednesday, July 9, 2014

Programming Language

C

C++

Java

PHP

Python

Swift Programming Language:Here it is a new programming language for apple.In Swift,article is about Apple programming language.It is a multi-paradigm compiled programming language developed by apple for iiOS and OS X development.

This Swift programming language is built with the LLVM compiler included in Xcode 6 beta, and uses the Objective-C runtime, allowing Objective-C, Objective-C++ and Swift code to run within a single program.

Software

Software or Computer Software is known as computer programs.It is a such kind of thing that makes our life easier.Computer software related in the computer hardware,which is the physical component of computer.


At the lowest level, executable code consists of machine language instructions specific to an individual processor – typically a central processing unit (CPU).

Software is usually written in high-level programming languages that are easier and more efficient for humans to use (closer to natural language) than machine language.

Here a computer software can build with programs.There are many kinds of programming language.Such as C,C++,C#,JAVA.Python,Oracle,PHP etc.

C and C++ is the programming language which for the most beginning level.So that For learning programming language it is better to start by C.

I want to say that if you want to know about the programming language,then visit this site.
Now here it is the most popular language to learn. I think that if you know about the C language then all kind of programming language will easy to learn.