Monday 31 August 2015

Program to Subtract Two Numbers - Java Programing

class subtract
{
public static void main ()
{
int a=2;
int b=1;
int c=a-b;
system.out.println("Diffrence is "+c);
}main
}class

Blogger Tricks

Program to Add Two Numbers - Java Programing

class addition
{
public static void main ()
{
int a=5;
int b=5;
int c=a+b;
system.out.println("Sum is"+c);
}main
}class

Wednesday 7 January 2015

Turn Your XBox Into a PC or Laptop

(1) 
Via the cable adapter, attach your USB memory device and the USB cable into your Xbox console.
(2) 
Turn on your Xbox console. This will reformat your USB device and it will be recognized by the Xbox, displaying the device in the dashboard.
(3)
To install Linux into your Xbox, you need the Mechassault "savegame" image. Download this image from websites such as SourceForge.net.
(4) 

Attach the USB memory device into your PC.
(5) 

Transfer the Mechassault image to your USB device by clicking and dragging.
(6) 

Remove the USB device and reattach the device to your Xbox.
(7) 

The USB will reappear in the dashboard. Open the USB and view the contents. You will see these options--emergency Linux, remove Linux and install Linux.


(8) 
Select "Memory" and then select the USB device. Select the save game image "Install Linux" and then select "Copy," and finally select "Xbox hard disk." Repeat the same process with the other two options.
(9) 

Insert a copy of "Mechassault" into your Xbox console.
(10) 
Go into the Xbox dashboard and select "Emergency Linux." If done correctly, the Xbox will restart and a black screen with white letters will appear in place of the Xbox dashboard. Linux is booting.
(11) 
Use the telnet default address is 192.168.0.3 and log in with "root" as your username and "Xbox" as your password.
(12)
Type the command "xbox_tool-a" when you are logged in. This will display the hard disk key. Save this key as the hard disk is encrypted and can be used to do modifications or recover information.
(13) 
If you took out the Mechassault game, put it back in the Xbox. Select "Install Linux." After this, you do not have to use Mechassault again.
(14) 
Install the full version of Linux. Your best bet to do this is to burn your own copy on a DVD-R with files from the Ed's Debian website. Place the disc into your Xbox and boot from it. Type "su" to login as an administrator and "xbox" for a password when the virtual keyboard shows up. Type "XBOXLinuxInstaller" and complete the installation by following the onscreen instructions.

Sunday 28 December 2014

Program to Check if a number is Prime or not

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=2,count=0;
printf("Enter the No.\n");
scanf("%d",&n);
while(i<=n/2)
{
if(n%i==0)
count++;
i++;
}
if(count==0)
printf("The No. is Prime");
else
printf("The No. is Not Prime");
getch();
}

Program to Add,Subtract,Multiply,Divide

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,add,sub,mul,div;
printf("Enter the Value of a & b\n");
scanf("%d%d",&a,&b);
add=a+b;
sub=a-b;
mul=a*b;
div=a/b;
printf("Addition=%d\n Subtraction=%d\n Multiplication=%d\n Division=%d\n",add,sub,mul,div);
getch();
}



Program to convert Kilometer to Meter

#include<stdio.h>
#include<conio.h>
void main()
{
int km,mtr;
printf("Enter the Value\n");
scanf("%d",&km);
mtr=km*1000;
printf("Converted Value is &d",mtr);
getch();
}

Output

Enter the Value
5
Converted Value is 5000

Program to Swap two No.'s

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
printf("Enter The Values\n");
scanf("%d%d",&a,&b);
temp=a;
a=b;
b=temp;
printf("Swaping of No. is %d%d",a,b);
getech();
}

Output
Enter The Values
1
2
Swaping of No. is 2 1