http://zatackcoder.com/reading-writing-file-in-android/ ]]>

import java.util.Scanner;

class Main {

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

int cx = in.nextInt(), cy = in.nextInt(), cr = in.nextInt();

int dx = in.nextInt(), dy = in.nextInt(), dr = in.nextInt();

int distance = ( Math.abs( cx – dx) + Math.abs ( cy- dy) );

if( distance == cr + dr )

System.out.println(“The circles are tangential”);

else if( distance < cr + dr )

System.out.println("The circles overlap");

else

System.out.println("The circles do not overlap");

}

}

#include

using namespace std;

int main () {

int n;

cin >> n;

int a [2] [5005];

int i;

for ( i = 0; i > a [0] [i];

cin >> a [1] [i];

}

for ( i = 0; i < n; i++ ) {

for ( int j = i + 1; j a [0] [j] ) {

int temp = a [0] [i];

a [0] [i] = a [0] [j];

a [0] [j] = temp;

temp = a [1] [i];

a [1] [i] = a [1] [j];

a [1] [j] = temp;

}

}

}

int start_continue = a [0] [0];

int finish_continue = a [1] [0];

int max_continue = finish_continue – start_continue;

int max_idle = 0;

for ( i = 1; i < n; i++ ) {

if ( finish_continue < a [1] [i] ) {

if ( a [0] [i] max_continue )

max_continue = finish_continue – start_continue;

if ( a [0] [i] – finish_continue > max_idle )

max_idle = a [0] [i] – finish_continue;

start_continue = a [0] [i];

finish_continue = a [1] [i];

}

}

}

cout << max_continue<<" "<< max_idle;

return 0;

}

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

}

This isn’t really needed is it? All it’s doing is calling the super. If you omit this entirely then when MyCustomActivity calls super.onCreate, the call will go straight to Activity.onCreate, wouldn’t it?

Mike

]]>package main

import (

“fmt”

)

func main() {

score := 21

tally := tally(score)

fmt.Println(tally)

}

func tally(score int) int {

div := score / 7

var hm int

for div > 0 {

hm += 7 * div

div -= 1

}

return hm

}

#include

int main (void)

{

int n,result = 1;

printf(“Enter the number: “);

scanf(“%d”,&n);

if (n == 0)

printf(“%d! = 1”,n);

if(n > 7)

return 0;

else

{

for(int i=1; i<=n; i++)

{

result = result * i;

}

printf("%d! = %d",n,result);

}

return 0;

}