number = 10;
sum = 0;
for (var i=1; i<= number; i++) {
sum = sum + number;
}
document.write("sum = " + sum);
number = 10;
for (var i=number; i > 0; i--) {
if ( i%2 == 1)
document.write(i);
}
product = 1;
number = 5;
for (var i=1; i < (number+1); i++) {
product = product * number;
}
document.write(product);
for ( var i=1; i<= 5; i++) {
for (var j=1; j<=3; j++) {
document.write("*");
}
document.write("<br />");
}
Johannady2 -5 Newbie Poster
sillyboy 43 Practically a Master Poster
Johannady2 -5 Newbie Poster
sillyboy 43 Practically a Master Poster
Johannady2 -5 Newbie Poster
sillyboy 43 Practically a Master Poster
Johannady2 -5 Newbie Poster
Ezzaral commented: Really pathetic trying to cheat on your test like this. -4
verruckt24 438 Posting Shark
sillyboy 43 Practically a Master Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
sillyboy 43 Practically a Master Poster
verruckt24 438 Posting Shark
notuserfriendly 1 Junior Poster
verruckt24 438 Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.