New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Regular loops and For loops Notes

by: Jessica Hutchinson

Regular loops and For loops Notes COSC 236

Marketplace > Towson University > ComputerScienence > COSC 236 > Regular loops and For loops Notes
Jessica Hutchinson
GPA 3.5
Introduction to COSC 1
Robert G. Eyer

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

This is a huge chunk of chapter 3.... more note to come later this week. In the next one I will include labs 2 and 3 :)
Introduction to COSC 1
Robert G. Eyer
Class Notes
Computer Science
25 ?




Popular in Introduction to COSC 1

Popular in ComputerScienence

This 0 page Class Notes was uploaded by Jessica Hutchinson on Thursday February 18, 2016. The Class Notes belongs to COSC 236 at Towson University taught by Robert G. Eyer in Spring 2016. Since its upload, it has received 28 views. For similar materials see Introduction to COSC 1 in ComputerScienence at Towson University.


Reviews for Regular loops and For loops Notes


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/18/16
Chapter 3 loops 0 Using a method to capture redundancy of a process This helps to limit output Nest loops star box example This code shows how to do a nested loop to produce a square box with stars as its outline The outer loop tells the program how many lines and the inner loop tells the actual data 0 All methods must start with public static void Main method printStars13 printStars7 printStars25 printSBox93 printBox54 Public static void printStarshowMany For i1 ilt howMany i Systemoutprintnquotquot Systemoutprintn Public static void printBox int howHigh int howWide printStarshowWide for int l 1 l lt howHighZ l systemoutprintquotquot for intj 1 lt howWideZ J39 Systemoutprintquot quot Systemoutprintn Value semantics when variables in main are copied into a parameter c A string variable is an object Example of code that prints out the average of 4 numbers public class Average4 public static double average4doube numl double num2 double num3doube num4 double average num1num2num3num44 return average public static void mainString args Systemoutprintnaverage415 22112 Example of code that scans the data the user inputs and nd the minimum import javautiScanner public class Awesomeness public static void mainString args Scanner console new ScannerSystemin SystemoutprintquotEnter 5 integers prompt int numl consolenextlnt int num2 consolenextlnt int num3 consolenextlnt int num4 consolenextlnt int num5 consolenextlnt int lowest numl forint i0 iltowest i if i gt lowest owesti Systemoutprintnquotthe lowest number is quot lowest int sum num1num2num3num4num5 SystemoutprintnquotThe sum is quot sum Example of code that prints this drawing gtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtlltgtllt public class drawFigure public static void mainString args forint s5s gt0 S forint is22 i gt0 ii2 Systemoutprintquotquot for intj 5 js gt0 j Systemoutprintquotquot forint ks22 k gt0 kk2 Systemoutprintquotquot Systemoutprintn end for line end main Printing Exponents Loop


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.