My program has an extra line of code, c++?

Ok so my output is supposed to be a table of tangent values of some angles. say for example, your minimum is 29.68 and your max is 30.23, it should print values starting from 29.7 to 30.2, but when i run it i get an extra line that says 30.3, which has no output in it. I want this line gone, can anyone fine the error?

{

double pi, value, inc, converted;

float mina, maxa;

int counter, count;

pi=3.14159;

counter=0;

inc=0.01;

count=10;

cout<<"This program will generate tables of tangents";

cout<<"\nEntering numbers that are greater than/equal to 90, less than/equal to 0, or in the wrong order will terminate the program.";

cout<<"\n\n ~~ ~~ ~~ ~~ ~~ ~~ ";

for (;;)

{

cout<<"\n\nPlease enter the minimum and maximum angle values: ";

cin>>mina>>maxa;

value=mina;

if (!cin)

cout<<"Bad >Update:

the question cuts off 3 times where it shows "..."

here are the full lines

cout<<showpoint<<setpresicion(3)

<<value<<" | ";

cout<<setprecision(4)

<<tan(converted)<<" ";

cout<<showpoint<<setprecision(3)

<<value<<" | ";

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 Q2A.ES - All rights reserved.