From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12885 invoked by alias); 6 Jun 2004 02:55:42 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 12865 invoked from network); 6 Jun 2004 02:55:41 -0000 Received: from unknown (HELO postal.usc.edu) (128.125.253.6) by sourceware.org with SMTP; 6 Jun 2004 02:55:41 -0000 Received: from aludra.usc.edu (aludra.usc.edu [128.125.253.184]) by postal.usc.edu (Sun ONE Messaging Server 6.0 HotFix 1.03 (built Apr 23 2004)) with ESMTP id <0HYV00E2X9GS70D0@postal.usc.edu> for gcc-help@gcc.gnu.org; Sat, 05 Jun 2004 19:55:40 -0700 (PDT) Date: Sun, 06 Jun 2004 02:55:00 -0000 From: Naga Raju Thogiti Subject: help needed To: gcc-help@gcc.gnu.org Message-id: MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_xWaX4HRiUo3DOwWalgIAKA)" X-SW-Source: 2004-06/txt/msg00054.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --Boundary_(ID_xWaX4HRiUo3DOwWalgIAKA) Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT Content-length: 617 Hi, I am writing C++ program for displaying a table of tangents given the lower and upper limits. The program initially rounds off ( e.g if one enters 29.58 and 30.33, it rounds off it to 29.6 and 30.3), and output the result in a table form. I have this problem with displaying the table completely and correctly, it was challenging for me to figure out where was I going wrong? Can you please help me out with it. When I entered, 29.58 30.33 it stops at 30.2, for 32 34, it stops at 33.9 but when I entered 84.14 84.44 and 89.44 89.48 it gives me correct table. I am enlcosing the code that I wrote. Thanks, Nagu --Boundary_(ID_xWaX4HRiUo3DOwWalgIAKA) Content-id: Content-type: TEXT/PLAIN; charset=US-ASCII; name=hw3.cpp Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=hw3.cpp Content-description: Content-length: 1391 #include #include #include void main() { double min_Value, max_Value; const double degtoRad = M_PI/180; double diff; int num_rows = 0; cout<<"\n\n\t This program will generate tables of tangents."; cout<<"\n\t (Enter a number >= 90 or < 0, or numbers in the wrong order, to terminate.)\n\n"; for (int i = 1;i<=10;i++) { cout<<"\t ***"; } cout<<"\n\n\t Minimum and maximum values for left column of table : "; cin>>min_Value>>max_Value; cout<=0 && max_Value>=0 && min_Value<90 && max_Value<90) { min_Value = floor(min_Value*10+0.5)/10.0; max_Value = floor(max_Value*10+0.5)/10.0; cout<<"\n\n\t\t\t\t Partial Table of Tangents"; cout<<"\n\t\t "; for (int i = 0;i<=9;i++) { cout<>min_Value>>max_Value; // num_rows = 0; } } --Boundary_(ID_xWaX4HRiUo3DOwWalgIAKA)--