C++ Programming

Site Stats
APCS schedule | APCS LogIn | APCS Forms | APCS Resources | APCS Archive | APCS Stuff
Java schedule | Java LogIn | Java Forms | Java Resources | Java Archive | Java Stuff
Adven schedule | Adven LogIn | Adven Forms | Adven Resources | Adven Archive | Adven Stuff
Stats schedule | Stats LogIn | Stats Forms | Stats Resources | Stats Archive | Stats Stuff

C++ Program 122h using a for loop

  Updated : March 13, 2009 7:50 AM

 

Program 122h-for
(Math Functions)

 

Program Description:  List the integers from X to Y, their squares, square roots, cubes, and fourth roots, all in a five column table.

Required Statements:  math functions, for loop, formatting statements

File names :  prog122hfor<lastname>

Sample Output:

Enter the starting number : 1
Enter the ending number : 20
Number    Square   Square Root     Cube     4th Root
  1           1      1.0000           1      1.0000
  2           4      1.4142           8      1.1892
  3           9      1.7321          27      1.3161
  4          16      2.0000          64      1.4142
  5          25      2.2361         125      1.4953
  6          36      2.4495         216      1.5651
  7          49      2.6458         343      1.6266
  8          64      2.8284         512      1.6818
  9          81      3.0000         729      1.7321
 10         100      3.1623        1000      1.7783
 11         121      3.3166        1331      1.8212
 12         144      3.4641        1728      1.8612
 13         169      3.6056        2197      1.8988
 14         196      3.7417        2744      1.9343
 15         225      3.8730        3375      1.9680
 16         256      4.0000        4096      2.0000
 17         289      4.1231        4913      2.0305
 18         324      4.2426        5832      2.0598
 19         361      4.3589        6859      2.0878
 20         400      4.4721        8000      2.1147
012345678901234567890123456789012345678901234567890

 

 

  

 

Ala All Als Be Da D'Ar K Co K Cu
Ki Lo My Sa Sc Vi
Not Listed


Last Name :

Email :

Select one of the following that describes when and why you are filling out this form:
This assignment is in on time.
This assignment is in on time, being resubmitted due to a failed submission (I have a copy of the original submission).
This assignment is a corrected submission for half the missed credit.
This assignment is one day late and will lose 15%.
This assignment is more than one day late (half credit at best).
This assignment is late because of an EXCUSED absence.
This assignment is being resubmitted at the request of the teacher.


code

 

Updated: Monday, September 20, 2010 2:41 PM

 

 

 

About | Site Map | Contact | Search | ©2005 brentwoodhigh.com