CS 1 Assignment #6
CS 1 Assignment #6
Code:
#include <iostream>
#include <iomanip>
int main()
{
double wholesale_cost,
markup_percent,
retail_price;
return 0;
}
float FallingDistance(double);
int d;
double celsius(double);
int main()
{
const int MIN_TEMP = 0,
MAX_TEMP = 20;
double C;
return 0;
}
double celsius(double R)
{
return (5.0/9.0) * (R - 32.0);
}
Result:
code:
#include <iostream>
#include <cstdlib> // For rand() and srand()
#include <ctime> // For time() function
using namespace std;
void coinToss();
int inputValidate(int);
int main()
{
int choice;
unsigned seed = time(0);
srand(seed);
cout << "How many times should the coin be tossed? ";
choice = inputValidate(choice);
return 0;
}
void coinToss()
{
const int MIN_VALUE = 1,
MAX_VALUE = 2;
int coin;