From: "Rafal Maj" Newsgroups: comp.os.msdos.djgpp Subject: Odp: I think this is a for problem... Date: Sat, 10 Feb 2001 10:48:50 +0100 Organization: Academic Computer Center CYFRONET AGH Lines: 48 Message-ID: <9632r1$n4u$1@info.cyf-kr.edu.pl> References: NNTP-Posting-Host: d-94-53-15.cyfronet.krakow.pl Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit X-Trace: info.cyf-kr.edu.pl 981798561 23710 149.156.1.175 (10 Feb 2001 09:49:21 GMT) X-Complaints-To: news AT cyf-kr DOT edu DOT pl NNTP-Posting-Date: 10 Feb 2001 09:49:21 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com #include main() { int count; cout << "How meany integers ?"<> count; int smallest=0; for (int n=0; n> i; if (n==0) smallest = i; if (i0) cout << "Smallest integer was : "<> ... to scanf( ... ) Remember to press alt+f5 after program finised to see user screen. Rafał Użytkownik Bob & Chris Parrish w wiadomości do grup dyskusyjnych napisał:pSVg6.203456$ge4 DOT 69048244 AT news2 DOT rdc2 DOT tx DOT home DOT com... > I need help with homework for beginning C. The question is: > > "Write a program that finds the smallest of several integers. Assume that > the first value read specifies the number of values remaining". > > I think I use the for structure. The chapter also covers the while, and > switch structures. > > I don't know where to start. Can anyone help? > -- > Chris Parrish > rcprrsh AT home DOT com > 303/617-4126 > >