Homework 1-1: Conditionals
- Take 2 numbers and print a multiplication table
- Convert Gallons to Liters
- Convert temperature from Fahrenheit to Celsius
- Convert number to names
- Create a help menu providing phone numbers for agents, institutions.
Homework 1-2: Lists, Loops, Files
- Write a program that will print A to F vertically on each new line.
- Create an array or list of numbers and calculate all.
- Make it interactive and take inputs from users until 'q' or 'Q' is presssed.
- Take inputs from file and print output to a file.
Homework 1-3: Numbers and Type Conversions
- Compute the circumference area of a circle given the radius.
- Take two numbers and calculate their GCD.
- Take two numbers and output the max / min / mean / sum of both.
- Convert Coins to currency amount
Homework 1-4: Fix it!
#include <stream>
int main
{
cout << "If this text",
cout >> " appears on your display, ";
cout << " endl;"
cout << 'you can pat yourself on '
<< " the back!" << endl.
return 0;
)
Homework 1-5: Which of the followings are valid variable names in C++?
a 586_cpu a_very_long_name123467890 b12 écu goto invalid object-oriented SetTextColor top_of_window true US us US$ VOID _var $var
Homework 1-6: Fix it!
int a(2.5);
const long large;
int b = '?';
char c('\'');
char z(333);
unsigned char ch = '\201';
int big = 50000;
unsigned size(80000);
double he's(1.7E+5);
float val = 54321.12345;
Homework 1-7: Use sizeof operator to show the number of bits occupied in memory by a variable
Write a c++ program that displays the memory space required by each data type.
No comments:
Post a Comment