Wednesday, November 24, 2010

Array

/*
   This is a simple example of an array where a user
    asks for 3 values,stores those values in an array and
    computes the total of the 3 values.
    The content is diplayed using the second loop code.
    The third loop displays the value of an array
    from the last index to index 0.
    The sum of the 3 values is then displayed

*/
import java.util.*;
public class Array1 {

static Scanner c = new Scanner(System.in);

public static void main(String a[]){

int number [] = new int[3];
int sum = 0;

for(int i = 0; i<3; i++){
System.out.print("Enter any number");
number[i]= c.nextInt();
sum = sum + number[i];
}

System.out.println();

for(int i = 0; i<3; i++){
System.out.print(number[i]+"\t");
}

System.out.println();
for(int i = 2; i>=0; i--){
System.out.print(number[i]+"\t");
}

System.out.println("\nThe Sum of the values entered is:"+ sum);
}
}
 
 

Sunday, November 14, 2010

What is an APA style?

APA format is the official style of the American Psychological Association (APA) and is commonly used to cite sources in psychology, education, and the social sciences. APA format originated in a 1929 article published in Psychological Bulletin that laid out the basic guidelines. These guidelines were eventually expanded into the APA Publication Manual.

Writing References Sample:






sources:
http://psychology.about.com/od/apastyle/a/apageneral.htm
http://psychology.about.com/od/apastyle/ig/APA-Format-Examples/