Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,665 members, 7,820,337 topics. Date: Tuesday, 07 May 2024 at 01:17 PM

Tim1212's Posts

Nairaland Forum / Tim1212's Profile / Tim1212's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 19 pages)

Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:56am On Aug 20, 2020
#include <iostream>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{

int guess;
int num;
int noOfGuessess = 0;
int chances = 5;
bool isGuessed = false;

srand(time(0));
num = rand() % 100;

while ((noOfGuessess < 5) && (!isGuessed))
{


cout << "Enter an integer greater than or equal to 0 and "
<< "\nless than 100: ";

cin >> guess;
cout << endl;
noOfGuessess++;
chances--;
if (guess > 100)
{


cout << "Invalid guess! " << endl;
isGuessed = true;

}

else if (guess == num)
{
cout << "WInner!. You guessed the correct number. "
<< endl;
isGuessed = true;
}
else if (guess < num)
cout << "Your guess is lower than the number.\n"
<< "Guess again!" << endl;
else
cout << "your guess is higher than the number.\n"
<< "Guess again!" << endl;


cout << "you have: " << chances << " chances! " << endl;
}


if (!isGuessed)
cout << "you loss!. The correct number is " << num << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:54am On Aug 20, 2020
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>

using namespace std;

const double MINIMUM_BALANCE = 1000.00;
const double SERVICE_CHARGE = 25.00;

int main()

{
string name;
int acountNumber;
double beginningBalance = 0.0;
double accountBalance = 0.0;
double amountDeposited = 0.0;
int numberOfDeposits = 0;
double amountWithdrawn = 0.0;
int numberOfWithdrawn = 0;
double transactionAmount = 0.0;
char transactionCode;
double interestPaid = 0.0;

bool isServiceCharge = false;

ifstream inFile;
ofstream outFile;


inFile.open("acc.dat"wink;

if (!inFile)
{
cout << "Cannot open the file. \nProgram terminated. "
<< endl;

return 0;
}

outFile.open("actfile.out"wink;

outFile << fixed << showpoint << setprecision(2);

cout << "Data processing...." << endl;

inFile >> name >> acountNumber >> beginningBalance;

accountBalance = beginningBalance;

inFile >> transactionCode >> transactionAmount;


while (inFile)
{
switch (transactionCode)
{
case 'D':
case 'd':
accountBalance = accountBalance + transactionAmount;
amountDeposited = amountDeposited + transactionAmount;
numberOfDeposits++;
break;
case 'I':
case 'i':
accountBalance = accountBalance + transactionAmount;
interestPaid = interestPaid + transactionAmount;
break;
case 'W':
case 'w':
accountBalance = accountBalance - transactionAmount;
amountWithdrawn = amountWithdrawn + transactionAmount;
numberOfWithdrawn++;

if ((accountBalance < MINIMUM_BALANCE) && (!isServiceCharge))
{
accountBalance = accountBalance - SERVICE_CHARGE;

isServiceCharge = true;
}
if ((accountBalance < transactionAmount) || (amountWithdrawn > accountBalance))
{
accountBalance = 0.0;
amountWithdrawn = 0.0;
numberOfWithdrawn = 0;
cout << "Insufficient fund...." << endl;
}




break;

default:
cout << "Invalid transaction code " << endl;
}



inFile >> transactionCode >> transactionAmount;
}

outFile << "Account Name: " << name << endl;
outFile << "Beginning Balance: $" << beginningBalance << endl;
outFile << "Ending Balance: $" << accountBalance <<endl;
outFile << "Interest Paid: $" << interestPaid <<endl << endl;

outFile << "Amount Deposited: $" << amountDeposited << endl;
outFile << "Number of Deposits: " << numberOfDeposits << endl << endl;

outFile << "Amount Withdrawn: $" << amountWithdrawn << endl;
outFile << "Number of withdrawn: " << numberOfWithdrawn << endl << endl;

outFile << "Thank you for banking with us!" << endl;

if (isServiceCharge)
outFile << "Service Charge: $" << SERVICE_CHARGE << endl;

inFile.close();
outFile.close();

return 0;
}


Input
Tim 467456 23750.45
W 259.00
d 1200.00
W 75.00
D 589.55
I 249
W 345
w 32.89
d 200
d 7000
w 804
d 9000.65
w 100000


Output

Account Name: Tim
Beginning Balance: $23750.45
Ending Balance: $0.00
Interest Paid: $249.00

Amount Deposited: $17990.20
Number of Deposits: 5

Amount Withdrawn: $0.00
Number of withdrawn: 0

Thank you for banking with us!
Service Charge: $25.00
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:51am On Aug 20, 2020
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>

using namespace std;

int main()
{

double testScore;
double average;
double sum = 0;
int count = 0;
char grade;

string firstName;
string secondName;

ifstream inFile;
ofstream outFile;

inFile.open("text.dat"wink;

if (!inFile)
{
cout << "Cannot open input file. "
<< "program terminated " << endl;

return 1;
}

outFile.open("avgtxt.out"wink;

outFile << fixed << showpoint << setprecision(2);

cout << "Data processing " << endl;

inFile >> firstName >> secondName;
inFile >> testScore;

while (inFile)
{

sum = sum + testScore;
count++;

switch (static_cast<int>(testScore / 10))
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
grade = 'F';
break;
case 6:
grade = 'D';
break;
case 7:
grade = 'C';
break;
case 8:
grade = 'B';
break;
case 9:
case 10:
grade = 'A';
break;
default:
cout << "Invalid score." << endl;

}
outFile << left << setw(12) << firstName
<< setw(12) << secondName
<< right << setw(4) << testScore
<< setw(2) << grade << endl;

inFile >> firstName >> secondName;
inFile >> testScore;
}



if (count != 0)
outFile << "Clasee Average: " << sum / count
<< endl;
else
outFile << "No data." << endl;

inFile.close();
outFile.close();

return 0;
}

input

Steve Gile 17.98
Rita Johnson 91.8
Randy Brown 85.5
Seema Arora 76.5
Samir Mann 73
Samantha McCoy 88.3

output

Steve Gile 17.98 F
Rita Johnson 91.80 A
Randy Brown 85.50 B
Seema Arora 76.50 C
Samir Mann 73.00 C
Samantha McCoy 88.30 B
Clasee Average: 72.18
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:47am On Aug 20, 2020
#include <iostream>
#include <cstdlib>
#include <ctime>


using namespace std;

int main()

{
int num;
bool isGuessed;
int guess;


srand(time(0));
num = rand() % 100;

isGuessed = false;

while (!isGuessed)
{
cout << "Enter an integer greater than or equal to 0 "
<< "and less than 100: ";

cin >> guess;
cout << endl;

if (guess == num)
{
cout << "You guessed the correct number. " << endl;
isGuessed = true;
}
else if (guess < num )
cout << "Your guess is lower than the number.\n Guess again!"
<< endl;
else
cout << "Your guess is higher than "
<< "the number.\n Guess again!"
<< endl;



}


return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:46am On Aug 20, 2020
#include <iostream>

using namespace std;

int main()
{

int num, digit;
char letter;


cout << "Program to convert uppercase letter to "
<< "their corresponding telephone digits."
<< endl;

cout << "To stop the program enter #. " << endl;

cout << "Enter an uppercase letter: ";
cin >> letter;
cout << endl;

while (letter != '#')
{
cout << "Letter: " << letter;
cout << ", Corresponding telephone digit: ";

num = static_cast<int>(letter) - static_cast<int>('A');

if (0 <= num && num < 26)
{
digit = (num / 3) + 2;

if (((num / 3 == 6) || (num / 3 == 7)) && (num % 3 == 0))
digit = digit - 1;

if (digit > 9)
digit = 9;

cout << digit << endl;
}
else
cout << "Invalid input. " << endl;

cout << "\nEnter another uppercase "
<< "letter to find its corresponding "
<< "telephone digit." << endl;
cout << "To stop the program enter #." << endl;


cout << "Enter a letter: ";
cin >> letter;
cout << endl;
}

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:43am On Aug 20, 2020
#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

const string SENTINEL = "-1";

int main()
{
int numOfBoxesSold, totalNumOfBoxesSold, numOfVolunteers;
string name;
double costOfBoxesSold;

cout << fixed << showpoint << setprecision(2);

cout << "Enter each volunteer's name and number of boxes sold "
<< endl
<< "by each volunteer, ending with -1" << endl;

totalNumOfBoxesSold = 0;
numOfVolunteers = 0;

cin >> name;

while (name != SENTINEL)
{
cin >> numOfBoxesSold;
totalNumOfBoxesSold = totalNumOfBoxesSold + numOfBoxesSold;

numOfVolunteers++;
cin >> name;
}

cout << endl;

cout << "The total number of boxes sold: " << totalNumOfBoxesSold << endl;

cout << "Enter the cost of one box: ";
cin >> costOfBoxesSold;
cout << endl;

cout << "The total number of money made by selling cookies: $"
<< totalNumOfBoxesSold / numOfVolunteers << endl;

if (numOfVolunteers != 0)
cout << "The average number of boxes sold by each volunteer: "
<< totalNumOfBoxesSold / numOfVolunteers
<< endl;
else
cout << "No output. " << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:42am On Aug 20, 2020
#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

int main()
{
string name;
int numOfVolunteers;
int numOfBoxesSold;
int totalNumOfBoxesSold;
int counter;
double costOfOneBox;

cout << fixed << showpoint << setprecision(2);

cout << "Enter the number of volunteers: ";
cin >> numOfVolunteers;
cout << endl;

totalNumOfBoxesSold = 0;
counter = 0;

while (counter < numOfVolunteers)
{
cout << "Enter the volunteer's name and the number "
<< "of boxes sold: ";
cin >> name >> numOfBoxesSold;

cout << endl;

totalNumOfBoxesSold = totalNumOfBoxesSold + numOfBoxesSold;
counter++;

}

cout << "The total number of boxes sold: " << totalNumOfBoxesSold << endl;

cout << "Enter the cost of one box: ";
cin >> costOfOneBox;
cout << endl;

cout << "The total money made by selling "
<< "cookies: $" << totalNumOfBoxesSold * costOfOneBox << endl;

if (counter != 0)
cout << " The average number of boxes sold "
<< "by each volunteer: " << totalNumOfBoxesSold / counter << endl;
else
cout << "No output" << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:41am On Aug 20, 2020
#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
int numOfItemsBought;
double shippingCharges;

cout << fixed << showpoint << setprecision(2);

cout << "A program to compute the shippping charge of an Item "
<< endl;

cout << "Enter quantity of item bought: ";
cin >> numOfItemsBought;
cout << endl;



if (numOfItemsBought < 5)
shippingCharges = 7.00 * numOfItemsBought;

else if ( 5 <= numOfItemsBought && numOfItemsBought < 10)
shippingCharges = 3.00 * numOfItemsBought;
else if ( numOfItemsBought >= 10)
shippingCharges = 0.0;

cout << "Shipping charges = $" << shippingCharges << endl << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:40am On Aug 20, 2020
#include <iostream>
#include <iomanip>

using namespace std;

const double RES_BILL_PROC_FEES = 4.50;
const double RES_BASIC_SERC_COST = 20.50;
const double RES_COST_PREM_CHANNEL = 7.50;

const double BUS_BILL_PROC_FEES = 15.00;
const double BUS_BASIC_SERV_COST = 75.00;
const double BUS_BASIC_CONN_COST = 5.00;
const double BUS_COST_PREM_CHANNEL = 50.00;

int main()

{
int accountNumber;
char customerType;
int numOfPremChannel;
int numOfBasicServConn;
double amountDue;

cout << fixed << showpoint << setprecision(2);

cout << "This program computes a cable "
<< "bill. " << endl;
cout << "Enter account number (an integer): ";
cin >> accountNumber;
cout << endl;

cout << "Enter customer type: "
<< "R or r (Residential), "
<< "B or b (Business): ";
cin >> customerType;
cout << endl;

switch (customerType)
{
case 'R':
case 'r':
cout << "Enter the number"
<< " of premium channels: ";
cin >> numOfPremChannel;
cout << endl;

amountDue = RES_BILL_PROC_FEES + RES_BASIC_SERC_COST
+ numOfPremChannel * RES_COST_PREM_CHANNEL;

cout << "Account number: "
<< accountNumber << endl;
cout << "Amount due: $" << amountDue << endl;
break;

case 'b':
case 'B':
cout << "Enter the number of basic "
<< "service connections: ";
cin >> numOfBasicServConn;
cout << endl;

cout << "Enter the number"
<< " of premiun channels: ";
cin >> numOfPremChannel;
cout << endl;

if (numOfBasicServConn <= 10)
amountDue = BUS_BILL_PROC_FEES + BUS_BASIC_CONN_COST
+ numOfPremChannel * BUS_COST_PREM_CHANNEL;

else
amountDue = BUS_BILL_PROC_FEES + BUS_BASIC_SERV_COST
+ (numOfBasicServConn - 10) * BUS_BASIC_CONN_COST + numOfPremChannel * BUS_COST_PREM_CHANNEL;

cout << "Amount number: "
<< accountNumber << endl;
cout << "Amount due: $" << amountDue << endl;
break;

default:
cout << "Invalid customer type. " << endl;
}
return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:39am On Aug 20, 2020
#include <iostream>
#define NDBUG
#include <cassert>

using namespace std;

int main()

{
int numerator, denominator, quotient;

cout << "Enter a quotient of two integers: ";
cin >> numerator >> denominator;
cout << endl;

assert(denominator != 0);
quotient = numerator / denominator;

cout << "Quotient = " << quotient << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:38am On Aug 20, 2020
#include <iostream>

using namespace std;

int main()
{
char grade;
int score;

cout << "Enter a test score between 0 and 100: ";
cin >> score;
cout << endl;

switch (score / 10)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
grade = 'F';
break;
case 6:
grade = 'D';
break;
case 7:
grade = 'C';
break;
case 8:
grade = 'B';
break;
case 9:
case 10:
grade = 'A';
break;
default:
cout << "Invalid test score." << endl;
}

cout << "your grade is " << grade << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:36am On Aug 20, 2020
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

using namespace std;

int main()
{

ifstream inFile;
ofstream outFile;

double test1, test2, test3, test4, test5;
double average;

string firstName;
string secondName;

inFile.open("test.dat"wink;

if (!inFile)

{
cout << " Cannot open the file. "
<< "the program terminates." << endl;
return 1;
}

outFile.open("testavg.out"wink;

outFile << fixed << showpoint << setprecision(2);

cout << "processing data." << endl;

inFile >> firstName >> secondName;
outFile << "Student name: " << firstName << " " << secondName << endl;

inFile >> test1 >> test2 >> test3 >> test4 >> test5;

outFile << "Test scores: " << setw(6) << test1
<< setw(6) << test2 << setw(6) << test3
<< setw(6) << test4 << setw(6) << test5
<< endl;

average = (test1 + test2 + test3 + test4 + test5) / 5.0;

outFile << "Average test score: " << setw(6) << average << endl;

inFile.close();
outFile.close();

return 0;
}

Student name: Timothy Ezike
Test scores: 63.93 83.20 23.40 67.21 45.89
Average test score: 56.73
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:35am On Aug 20, 2020
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

using namespace std;

int main()
{
ifstream inFile;
ofstream outFile;

double test1, test2, test3, test4, test5;
double average;

string name;

inFile.open("test.dat"wink;
outFile.open("testavg.out"wink;

outFile << fixed << showpoint << setprecision(2);

cout << "processing data..........." << endl << endl;

getline(inFile, name);
outFile << "Student name: " << name << endl;

inFile >> test1 >> test2 >> test3 >> test4 >> test5;
outFile << "Test score: " << setw(6) << test1
<< setw(6) << test2 << setw(6) << test3
<< setw(6) << test4 << setw(6) << test5
<< endl;

average = (test1 + test2 + test3 + test4 + test5 ) / 5.0;

outFile << "Average test score: " << setw(6) << average
<< endl;

inFile.close();
outFile.close();

return 0;
}
Andrew Miller Malik
87.50 89 65.75 37 98.50

Student name: Andrew Miller Malik
Test score: 87.50 89.00 65.75 37.00 98.50
Average test score: 75.55
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:32am On Aug 20, 2020
#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

int main()

{
string movieName;
double childTicketPrice;
double adultTicketPrice;
int noOfAdultTicketsSold;
int noOfChildTicketsSold;
double percentDonation;
double grossAmount;
double amountDonated;
double netSaleAmount;

cout << fixed << showpoint << setprecision(2);

cout << "Enter the movie name: ";
getline(cin, movieName);
cout << endl;

cout << "Enter the price of an adult ticket: ";
cin >> adultTicketPrice;
cout << endl;

cout << "Enter the price a child ticket: ";
cin >> childTicketPrice;
cout << endl;

cout << "Enter number of adult ticket sold: ";
cin >> noOfAdultTicketsSold;
cout << endl;

cout << "Enter number of child ticket sold: ";
cin >> noOfChildTicketsSold;
cout << endl;

cout << "Enter the percentage of donation: ";
cin >> percentDonation;
cout << endl << endl;

grossAmount = adultTicketPrice * noOfAdultTicketsSold +
childTicketPrice * noOfChildTicketsSold;

amountDonated = grossAmount * percentDonation / 100;

netSaleAmount = grossAmount - amountDonated;

cout << "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
<< "-*-*-*-*-*-*-*-*-*-*-*-*-*-*" << endl;
cout << left << setfill('.') << setw(35) << "Movie Name: "
<< right << " " << movieName << endl;
cout << left << setw(35) << "Number of Tickets Sold: "
<< setfill(' ') << right << setw(10)
<< noOfAdultTicketsSold + noOfChildTicketsSold
<< endl;
cout << setfill('.') << left << setw(35) << "Gross Amount: "
<< setfill(' ') << right << " $"
<< setw(cool << grossAmount << endl;
cout << setfill('.') << left << setw(35)
<< "Percentage of Gross Amount Donated: "
<< setfill(' ') << right
<< setw(9) << percentDonation << '%' << endl;
cout << setfill('.') << left << setw(35)
<< "Amount Donated: "
<< setfill(' ') << right << " $"
<< setw(cool << amountDonated << endl;
cout << setfill('.') << left << setw(35) << "Net Sale: "
<< setfill(' ') << right << " $"
<< setw(cool << netSaleAmount << endl;

return 0;

}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:30am On Aug 20, 2020
#include <iostream>

using namespace std;

int main()
{
int fahrenheit;
double celsius;

cout << "Enter temperature in Fahrenheit: ";
cin >> fahrenheit;
cout << endl;

celsius = static_cast<int>
(5.0 / 9 * (fahrenheit - 32) + 0.5 );

cout << fahrenheit << " degree F = "
<< celsius << " degree C. " << endl;

return 0;

}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:29am On Aug 20, 2020
#include <iostream>

using namespace std;

const int MIN_PER_HOUR = 60;
const int SEC_PER_MIN = 60;

int main()
{
int second, minute, hour;
int temp;

cout << " Enter the elaps time in seconds: ";
cin >> temp;
cout << endl;

cout << " The elaps time you entered is " << temp << endl;

second = temp % SEC_PER_MIN;

temp = temp / SEC_PER_MIN;

minute = temp % MIN_PER_HOUR;

hour = temp / MIN_PER_HOUR;

cout << " The elaps time you entered is ";
cout << hour << ":" << minute << ":" << second << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:25am On Aug 20, 2020
#include <iostream>

using namespace std;

const double CONVERSION = 2.54;
const int INCHES_IN_FOOT = 12;
const int CENTIMETETERS_IN_METER = 100;

void showChoice();
void feetAndIchesToMeterAndCent(int f, int in,
int& mt, int& ct);
void meterAndCentToFeetAndIches(int mt, int ct,
int& f, int& in);

int main()
{
int feet, inches;
int meters, centimeters;
int choice;

do
{
showChoice();
cin >> choice;
cout << endl;

switch (choice)
{
case 1:
cout << "Enter feet and iches: ";
cin >> feet >> inches;
cout << endl;
feetAndIchesToMeterAndCent(feet, inches,
meters, centimeters);
cout << feet << " feet(foot), "
<< inches << " inch(es) = "
<< meters << " meter(s), "
<< centimeters << " centimeter(s). " << endl;
break;
case 2:
cout << "Enter meter and centimeter: ";
cin >> meters >> centimeters;
cout << endl;
meterAndCentToFeetAndIches(meters, centimeters,
feet, inches);
cout << meters << " meter(s), "
<< centimeters << " centimeter(s) = "
<< feet << " feet(foot), "
<< inches << " inch(es). "
<< endl;
break;
case 99:
break;
default:
cout << "Invalid input." << endl;
}
}
while (choice != 99);
return 0;
}
void showChoice()
{
cout << "Enter--" << endl;
cout << "1: To convert from feet and inches to meters "
<< "and centimeters." << endl;
cout << "2: To convert from meters and centimeters to feet "
<< " and inches " << endl;
cout << "99: To quit the program." << endl;
}
void feetAndIchesToMeterAndCent(int f, int in,
int& mt, int& ct)
{
int inches;
inches = f * INCHES_IN_FOOT + in;
ct = static_cast<int>(inches * CONVERSION);
mt = ct / CENTIMETETERS_IN_METER;
ct = ct % CENTIMETETERS_IN_METER;
}
void meterAndCentToFeetAndIches(int mt, int ct,
int& f, int& in)
{
int centimeters;
centimeters = mt * CENTIMETETERS_IN_METER + ct;
in = static_cast<int>(centimeters / CONVERSION);
f = in / INCHES_IN_FOOT;
in = in % INCHES_IN_FOOT;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:20am On Aug 20, 2020
#include <iostream>
#include <cmath>
#include <cctype>
#include <iomanip>

using namespace std;

int main()
{
int num;
double firstNum, secondNum;
char ch = 'T';

cout << fixed << showpoint << setprecision(2) << endl;

cout << " Is " << ch << " a lowercase letter? "
<< isupper(ch) << endl;
cout << " Lowercase A is " << static_cast<char>(tolower('A')) << endl;

cout << " 4.5 to the power 6.0 = " << pow(4.5, 6.0) << endl;

cout << " Enter two decimal numbers: ";
cin >> firstNum >> secondNum;
cout << endl;

cout << " FIRST NUM: " << firstNum << " to the power of "
<< secondNum << " = " << pow(firstNum, secondNum) << endl;

cout << " 5.0 to the power of 4 = " << pow(5.0, 4) << endl;

firstNum = firstNum + pow(3.5, 7.2);
cout << " firstNum = " << firstNum << endl;

num = -32;
cout << " Absolute value of " << num << " = " << abs(num) << endl;

cout << " Square root of 28.00 = " << sqrt(28.00) << endl;

return 0;

}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:18am On Aug 20, 2020
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
string name;
int numOfVolunteers;
int numOfBoxesSold;
int totalNumOfBoxesSold;
int counter;
double costOfOneBox;

cout << fixed << showpoint << setprecision(2);

cout << "Enter the number of volunteers: ";
cin >> numOfVolunteers;
cout << endl;

totalNumOfBoxesSold = 0;
counter = 0;

while (counter < numOfVolunteers)
{
cout << "Enter the volunteer's name"
<< " and the number of boxes sold: ";
cin >> name >> numOfBoxesSold;
cout << endl;

totalNumOfBoxesSold =totalNumOfBoxesSold + numOfBoxesSold;
counter++;
}

cout << "The total number of boxes sold: "
<< totalNumOfBoxesSold << endl;
cout << "Enter the cost of one box: ";
cin >> costOfOneBox;
cout << endl;
cout << "The total money made by selling "
<< "cookies: $"
<< totalNumOfBoxesSold * costOfOneBox << endl;
if (counter != 0)
cout << "The average number of "
<< "boxes sold by each volunteer: "
<< totalNumOfBoxesSold / counter << endl;
else
cout << "No input. " << endl;
return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:17am On Aug 20, 2020
#include <iostream>
using namespace std;

int main()
{
int num1, num2;

cout << "Enter any two intergers: ";
cin >> num1 >> num2;
cout << endl;

cout << "The two intergers entered are " << num1 << " and " << num2 << endl;

if (num1 > num2)
cout << "The larger number is " << num1 << endl;
else
cout << num2 << " is lesser " << endl;
if (num2 > num1)
cout << "The larger number is " << num2 << endl;
else
cout << num2 << "is lesser " << endl;

return 0;

}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:15am On Aug 20, 2020
#include <iostream>

using namespace std;
int main ()
{
int a,b;
a = 65;
b = 78;

cout << 29 / 4 << endl;
cout << 3.0 / 2 << endl;
cout << "Hello there.\n";
cout << 7 << endl;
cout << 3 + 5 << endl;
cout << "3 + 5 ";
cout << "** ";
cout << endl;
cout << 2 + 3 * 6 << endl;
cout << "a" << endl;
cout << a << endl;
cout << b << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:14am On Aug 20, 2020
#include <iostream>

using namespace std;

int main ()
{
cout << 29 / 4 << endl;
cout << "Hello There. " << endl;
cout << 12 << endl;
cout << "4 + 7 " << endl;
cout << 4 + 7 << endl;
cout << 'A' << endl;
cout << "4 + 7 = " << 4 + 7 << endl;
cout << 2 + 3 * 5 << endl;
cout << "Hello \nthere. " << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:10am On Aug 20, 2020
#include <iostream>
using namespace std;
int main ()
{
int feet;
int inches;

cout << "Enter two integers separated by one or more spaces: ";
cin >> feet >> inches;
cout << endl;

cout << "Feet = " << feet << endl;
cout << "Inches = " << inches << endl;

return 0;
}
Programming / Re: A Thread For C++ Programs by Tim1212(m): 9:09am On Aug 20, 2020
#include <iostream>
using namespace std;

int main ()
{
double length;
double width;
double area;
double perimeter;
cout << "program to compute and output the perimeter and "
<<"area of a rectangle." << endl;
length = 6.0;
width = 4.0;
perimeter = 2 * (length + width);
area = length * width;

cout << "Length = " << length << endl;
cout << "width = " << width << endl;
cout << "Perimeter = " << perimeter << endl;
cout << "Area = " << area << endl;

return 0;
}
Programming / A Thread For C++ Programs by Tim1212(m): 9:06am On Aug 20, 2020
#include <iostream>

using namespace std;

int main ()
{
int length;
int width;
double perimeter;
double area;

length = 6;
width = 4;
perimeter = 2 * ( length + width );
area = length * width;

cout << "Length = " << length << endl;
cout << "width = " << width << endl;
cout << "Area = " << area << endl;
cout << " Perimeter = " << perimeter << endl;

return 0;
}

I will be explaining every single program starting from the beginning.
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 4:04am On Aug 20, 2020
Money was invented to control people's economy. They know everyone can not have access to cash.

Some will die poor, many can not afford hospital bills or even feed.

Permit me friends, to say that money �� has no value.

Giant companies are after people's data, now stop envying billionaires or saying bad stuff about them.

Start growing your own data cus it is the oil of today's economy.

No one can have access or control your data. It is yours forever..

Stop pursuing money start building data or taxation/recession will take all your money away.
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 3:48am On Aug 19, 2020
� I have a Talk Show on 20th of August in regard to how #AI #MachineLearning #DataScience have affected the world economy and how we run business.

Venue: WhatsApp kiss
Time: 8pm West Africa Time

You can join as audience �

#DEVCommunity

Speaker: Aspiring Data Scientist.
Upcoming Statistician
Passionate Developers
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 1:57am On Aug 18, 2020
We have been developing softwares, website and mobile application for quite a long time now.

I am much more concern about business aspect, let's turn your project into a multi billion company here and now.
�� [1/5]
#businessdevelopment

Few developers are business oriented folks, which is the most intrinsic part of softwares.

Taking your app public for Users will expose you more to what exactly users may like.
[2/5]�


The UI/UX design used will determine how interesting the user may find it.

Visual appealing design are more important to users, they tend to stay or never to come back.

Plan a good UI

�[3/5]

Now you want to measure your performance and how user interact with your software or website.

You need analytics software:
Google analytics is more preferable, the journey has just began.

Monitoring your progress on daily basis
�[4/5]

Funding! Not important now. First run the company independently by reducing cost:

Operate from home �

Never rent an office � until you have gotten your audience interest.

Work with friends � so you don't have to pay anyone until you start earning

[5/5]

@TimIyke1
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 7:02am On Aug 13, 2020
Am Tim a Data Scientist and Software Developer, currently running advanced training and seminars on:

Machine Learning
AI
Data Science
Big Data
Robotics
Statistics Learning.

Data driven technology is rapidly changing the world economy.

We are now in Data World, the only way to combat this pandemic is through:

Science and innovation
High technology
Research and Development.

The prerequisite: Your problem solving skills and analytic skills should exceed 50%.

You can contact me 08125619673
tim.diib@gmail.com
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 6:44am On Aug 13, 2020
Who is interested in learning

Machine Learning
AI
Data Science
Big Data
Robotics
Statistics Learning


Add me up on WhatsApp. 08125619673
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 11:28pm On Aug 11, 2020
ABCthingx:
Do you know:
The first Space Robot was coded in pure CSS.

This thread is a waste of server space.
Seun should just trash this!

Keep wasting your time learning various programming language.. HTML5/CSS3 are use to design all the apps or websites and softwares.

Wikipedia articles are outdated and are written by non experts. Keep reading their articles. More confusion....
Programming / Re: HTML5 A Programming Language Or Not by Tim1212(m): 10:49pm On Aug 11, 2020
Source code are equally available. Core HTML5/CSS3

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 19 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 100
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.