Tim1212's Posts
Nairaland Forum › Tim1212's Profile › Tim1212's Posts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 26 pages)
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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" ;if (!inFile) { cout << " Cannot open the file. " << "the program terminates." << endl; return 1; } outFile.open("testavg.out" ;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 |
#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" ;outFile.open("testavg.out" ;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 |
#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( << 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( << amountDonated << endl;cout << setfill('.') << left << setw(35) << "Net Sale: " << setfill(' ') << right << " $" << setw( << netSaleAmount << endl;return 0; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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; } |
#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. |
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. |
� 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 Time: 8pm West Africa Time You can join as audience � #DEVCommunity Speaker: Aspiring Data Scientist. Upcoming Statistician Passionate Developers |
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 |
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 |
Who is interested in learning Machine Learning AI Data Science Big Data Robotics Statistics Learning Add me up on WhatsApp. 08125619673 |
ABCthingx: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.... |
Source code are equally available. Core HTML5/CSS3 |
More on ATM UI in transaction process
|
ATM UI created with HTML5/CSS3 Screenshot available, you can still watch the video @TimIyke1 Twitter account.
|
ABCthingx:Can you show me your portfolios, let's start from there |
ATM programs are still #HTML5 #CSS3 with #javascript I created my own version Access Bank ATM with HTML5/CSS3. #uiux #codechallenge #diibacademy #100DaysOfCode ©️Access Bank PLC https://m.facebook.com/story.php?story_fbid=3387381787985706&id=100001417537058 |
;
<< grossAmount << endl;