class Program { public static void main(String[] args) {
Scanner Scan = new Scanner(System.in); System.out.print("A = "); int A = Scan.nextInt(); System.out.print("B = "); int B = Scan.nextInt(); System.out.print("C = "); int C = Scan.nextInt(); double kp = 0,ko = 0;
if (A > 0) kp++; else if (A < 0)ko++; if (B > 0) kp++; else if (B < 0)ko++; if (C > 0) kp++; else if (C < 0)ko++;
import java.io.*;
import java.lang.*;
class Program {
public static void main(String[] args) {
Scanner Scan = new Scanner(System.in);
System.out.print("A = ");
int A = Scan.nextInt();
System.out.print("B = ");
int B = Scan.nextInt();
System.out.print("C = ");
int C = Scan.nextInt();
double kp = 0,ko = 0;
if (A > 0) kp++;
else if (A < 0)ko++;
if (B > 0) kp++;
else if (B < 0)ko++;
if (C > 0) kp++;
else if (C < 0)ko++;
System.out.println("kp(>0) = "+kp);
System.out.print("ko(<0) = "+ko);
}
}
<head>
<script>
function doProcess() {
var fields=document.forms[0].getElementsByTagName('INPUT');
var val=0;
var total=1;
for (var i=0;i<fields.length;i++) {
if ((fields[i].type=='text')&&(fields[i].name.indexOf('number')==0)) {
val=parseInt(fields[i].value);
total*=val*1;
}
}
document.forms[0].pr.value = total;
}
</script>
</head>
<body align="center">
<form method = "post" action = "/cgi-bin/formmail" >
<input name = "number0" type = "text" size = "4"
maxlength = "5" />
<input name = "number1" type = "text" size = "4"
maxlength = "5" />
<input name = "number2" type = "text" size = "4"
maxlength = "5" />
<input name = "number3" type = "text" size = "4"
maxlength = "5" />
<input name = "number4" type = "text" size = "4"
maxlength = "5" />
<input name = "number5" type = "text" size = "4"
maxlength = "5" />
<input name = "number6" type = "text" size = "4"
maxlength = "5" />
<input name = "number7" type = "text" size = "4"
maxlength = "5" />
<input name = "number8" type = "text" size = "4"
maxlength = "5" />
<input name = "number9" type = "text" size = "4"
maxlength = "5" />
<br><br>
<input type="button" name="click1" value="Подсчитать" onClick="doProcess()">
<p>
<label>Произведение:
<input name = "pr" type = "text" size = "20"
maxlength = "50" />
</form>
</body>
</html>