CSE 201 homework 2.1

CSE 201 homework 2.1 - it on the left side of the equal...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Thierno Diallo CSE 201 Homework 2 1. The concept of a program variable is to allow the user to store and work with data in the computer’s memory. It’s used to assign a variable to a data, by variable declaration, which must be declared before they can be used. Example: Y= 2 In this expression; the Y is the variable and 2 is the data assigned to the variable. 1. The concept of a data type is to determine the kind of values that variable can hold and what operations can be applied to it, and to help the computer program to quickly process the data input. 2. The purpose of assignment statement is to carry out an operation which take the value on the right side of the assignment operator (=) and storing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: it on the left side of the equal sign. 3. a. 2.0* 3.1415*2.7 b. phrase is 12 character long c. add d. be or not to be e. to be or not to be, that is the equation. f. 21/4 = 5 g. age % 4 = 1 h. 21 – 0 = 21 5. import java.util.Scanner; public class awesome { /** * @param args */ public static void main(String args) { // TODO Auto-generated method stub Scanner home = new Scanner (System.in); System.out.println( "Please enter today's date:" ); String v = home.nextLine(); System.out.println( "Today is " + (v.substring( , 7 )) + (v.substring( 7 , 14 )) + " 3. " + " what a great day! " ); } }...
View Full Document

This note was uploaded on 03/13/2011 for the course CSE 201 taught by Professor All during the Winter '09 term at Ohio State.

Page1 / 2

CSE 201 homework 2.1 - it on the left side of the equal...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online