This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script language="JavaScript"> | |
function Complete() | |
{ | |
var nameIdt = document.getElementById('yourName').value; | |
if (document.getElementById('yourName').value = true) { | |
document.write(nameIdt); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var city = ["Moscow", "Portugal", "UK", "Paris", "Italy"]; | |
var count = [16516, 78848, 8754, 84784, 5588]; | |
document.write(city[0] + " \- " + count[0] + "<br />" + city[1] + " \- " + count[1] + "<br />"); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Напишите программу «повторюшку», которая вводит | |
строчку с клавиатуры, а затем её же и выводит.*/ | |
import java.util.Scanner; | |
public class HelloWorld { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Напишите программу, которая вводит число, а | |
выводит на единичку больше.*/ | |
import java.util.Scanner; | |
public class HelloWorld { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Напишите программу, которая вводит положительное | |
число, а выводит значение его квадратного корня.*/ | |
import java.util.Scanner; | |
import static java.lang.Math.sqrt; | |
public class HelloWorld { | |
/** | |
* @param args | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println("Введите ваше имя:"); | |
String name = in.nextInt(); | |
System.out.println("Выберите ваш пол:\n1 - мужской\n2 - женский"); | |
String sex = in.nextInt(); | |
if(sex == 1) { | |
System.out.println("Уважаемый " + name); | |
} | |
else { | |
System.out.println("Уважаемая " + name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MultiplicationTable { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
System.out.println("Таблица умножения\n"); | |
for(int i = 1; i < 10; i++){ | |
for(int k = 1; k < 10; k++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Crocodile { | |
private long t; | |
private boolean state; | |
public Crocodile(){//создание крокодила | |
} | |
public double getWeight(){//возвращает вес | |
return 45; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass { | |
private int myClassPropeties; | |
void setMyClassPropeties(int number){ //или void setMyClassPropeties(int myClassPropeties){ | |
myClassPropeties = number; //тогда здесь this.myClassPropeties = myClassPropeties; | |
} | |
int getMyClassPropeties(){ | |
return myClassPropeties; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass { | |
private double width; | |
private double height; | |
void setValues(double width, double height){ | |
this.width = width; | |
this.height = height; | |
} | |
double getSq(){ |
OlderNewer