Friday, September 26, 2014

For Loops In Java Programming

Program:

package serial;

public class tab{
public static void main(String[]args){
int count;
for(count=1;count<=10;count++){
System.out.println(count);
}

}

}

Output:

1
2
3
4
5
6
7
8
9
10

Screenshots

Program



Output


Using Multiple Class In Java

Program:

package munim2;
import java.util.Scanner;
public class rab {
public static void main(String[]args){
Scanner mon=new Scanner(System.in);
jab jabobject=new jab ();

System.out.println("Enter your real name: ");
String name=mon.nextLine();

jabobject.dress(name);
}

}

You must have to take another class to the same source file of the same package.


package munim2;

public class jab {
public static void dress(String name){
System.out.println("Hey "+name);
}

}

Follow the screenshots:

Screenshots

Set Class


Program






Output



Wednesday, September 24, 2014

Simple Hello World Program In PHP

Program:

<?php
     echo 'hello world';

?>

Output In the browser:    hello world


Screenshots

Program


Output



Monday, September 22, 2014

Find Average Using While Loop In Java

Program:


import java.util.Scanner;
public class readerr {
public static void main(String[]args){
Scanner mon=new Scanner(System.in);

double total=0;
double one;
double count = 0;
double average;

while(count<10){
one=mon.nextDouble();
total=total+one;
count++;
}
average=total/10;
System.out.println("the average of the numbers is "+total);

}



Screenshots

Program


Output





where is the wrong keyword written.........find out

Find Average by Scanning In Java

Program:

package munim;
import java.util.Scanner;
public class reader {
public static void main(String[]args){
double a,b,c,average;
Scanner mon=new Scanner(System.in);
a=mon.nextDouble();
b=mon.nextDouble();
c=mon.nextDouble();
average=(a+b+c)/3;
System.out.println("the average is "+average);

}
}

Screenshots

Progam


Output


Conditional Operators In Java

Program:

package munim2;

public class dron {
public static void main(String[] args){

int size;
size=40;
System.out.println(size>30 ? "your size is big" : "your size is small");
}

}

Screenshots

Program


Output



else if Statement In Java Programming

Program:

package munim;
import java.util.Scanner;
public class real {
public static void main(String[] args){

Scanner mon=new Scanner(System.in);
double size;
size=mon.nextDouble();

if(size>40)
System.out.println("there are not dress in your size");
else{
if(size<10)
System.out.println("the dress start from 10 size");
else
System.out.println("there is a dress for you");


}
}
}

Screenshots

program


Output


Thursday, September 4, 2014

Javascript Concept

Javascript:

Javascript is a script which is used in a webpage for dynamic view.It is a scripting language.

At the beginning of the javascript you have to follow these steps.

1.At first you have to download a code editor like notepad++.
2.You must have to know HTML and CSS.
3.Then open notepad++ and write these code.

First code:

<html>
<head>
<title>creativity</title>
</head>
<body>
<script type="text/javascript">
document.write("please touch it");
</script>
</body>
</html>

4.Next you have to save the file anywhere and the file type must be .js and .html extension.And must put the both file in the same folder.
5.Run the HTML file on your browser and get the output below.

Follow the screenshots.

Output on the browser: please touch it.

Screenshots

One


Two


Three

\

Four


Output after run the html file on browser



Sunday, August 24, 2014

Concept of variables in PHP

Program:

<?php
echo 'ami akhon php shikhtesi:i\'m now learning php';

$deal = 'php';

$vat = 'learning';

echo 'ami akhon '.$deal.' shikhtesi:i\'m now '.$vat.' '.$deal.'';
?>

Screenshots


Output


Print a simple line in PHP

Program:

<?php
echo 'ami akhon php shikhtesi:i\'m now learning php ';
?>

Screenshots


Output





Saturday, August 23, 2014

Linking PHP to server by XAMPP

Linking PHP:

1.After downloading XAMPP,you have to install it to your C drive.
2.When install it successfully,then you have to find the C:/>xampp>htdocs .
3.All PHP file will be saved on the htdocs folder.

Now follow the screenshots below:

Screenshots

Step 1:installing Xampp in c drive



Step 2:Saving file directory


Step 3:Saving my php file


Open the program editor like notepad++.Then create a new file and save it the name as your wish on the directory.The file must be a .php(dot php) file.I have saved it as panaroma.php file.

Follow the screenshots:



Screenshots





So,now after saving the file as panaroma.php,go to the browser and write localhost.

But before that you have to remember the XAMPP server was run and start or not.

on your browser you can see:

Screenshots



Next after writing localhost/panaroma.php or which you saved that file to C:/>xampp>htdocs>your saving file on your browser.

Screenshot


This will appear.Because I have saved that file by writing this program on notepad++ as the name of panaroma.php.

Screenshot




Friday, August 22, 2014

Simple PHP in notepad++

Program:

<?php
phpinfo();
?>


Screenshots



2


Downloading and Installing XAMPP in PHP

About XAMPP:

XAMPP is a free and open source cross-platform web server solution stack package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages.

Downloading XAMPP:

Go to     this link.

And download the XAMPP file for windows or linux or mac,which operating system you r using.
follow the screenshots below:

Screenshots





Installing and run the XAMPP: 

Double click and install the downloaded file and it will automatic run.
Follow the screenshots below:

Screenshots


After installing and run the downloaded file,this type of screen will appear.

Then for PHP click the start button of apache and mysql.

Follow the screenshots.


Using simple if-else statement in java programming

Program:

package munim3;

public class fabrics {
public static void main(String args[]){
int student,teacher;
student=50;
teacher=10;
if(teacher<student){
System.out.println("teacher can teach every students");
}
else{
System.out.println("teaacher can not teach the students");
}
}

}

Screenshots

Output


How to download eclipse for java programming

Increment Operators In Java Programming

Program:

package munim2;
import java.util.Scanner;
public class prefatch {
public static void main(String args[]){
Scanner moni=new Scanner(System.in);
int tree;
tree=moni.nextInt();
System.out.print("the number of tree is :");
System.out.println(++tree);
System.out.print("the changing number of tree is :");
System.out.println(--tree);
tree++;
tree++;
System.out.print("another number of tree is :");
System.out.println(tree);
}

}

Screenshots



Output


Thursday, August 21, 2014

Operators Of Math For Java Programming

Program:

package munim1;

public class priyo {
public static void main(String[]args){
int friend,brother,total;
friend=10;
brother=20;
total=friend+brother;
System.out.print("the total number is :");
System.out.println(total);
}

}


Screenshots





Output


Monday, August 18, 2014

A Program of Sum, Subtraction, Production and Division.

#include <stdio.h>

#include <stdlib.h>

int main()

{

int a,b,add,sub,pro;

float div;

printf("Enter 1st number: ");

scanf("%d",&a);

printf("Enter 2nd number: ");

scanf("%d",&b);

add=a+b;

sub=a-b;

pro=a*b;

div=(float)a/(float)b;

printf("\nSum=%d",add);

printf("\nSubstration=%d",sub);

printf("\nProduction=%d",pro);

printf("\nDivision=%.2f",div);

getch();

return 0;

}

Sunday, August 10, 2014

Multi Function In C Programming Language

#include<stdio.h>
add()
{
    int x=10,y=12,res;
    printf("enter the value of x\n");
    scanf("%d",&x);
    printf("enter the value of y\n");
    scanf("%d",&y);
    res=x+y;
    printf("the result is %d",res);
}
substract()
{
    int num1,num2,result;
    printf("enter the value of num1\n");
    scanf("%d",&num1);
    printf("enter the value of num2\n");
    scanf("%d",&num2);
    result=num1-num2;
    printf("the result is %d",result);
}
run_it()
{
    add();
}
main()
{
    char answer[20];
    printf("what do you want to do?? (type add or substract)");
    scanf("%s",&answer);
    if(strcmp(answer, "add")==0)
    {
        run_it();
    }
    else if(strcmp(answer, "substract")==0)
    {
        substract();
    }
    else
    {
        printf("i can not work\n");
    }
    fflush(stdin);
    getchar();
}

Simple C Program Using Function

#include<stdio.h>
add()
{
    int x=10,y=12,res;
    printf("enter the value of x\n");
    scanf("%d",&x);
    printf("enter the value of y\n");
    scanf("%d",&y);
    res=x+y;
    printf("the result is: %d",res);
}
main()
{
    add();
    fflush(stdin);
    getchar();
}