Freelancing(Developer & Trainer). Undertaking projects/assignments. Open for short & long term contracts.
⚡ Cpp Program 🔥 Artist album tracks #tecqmate
Get link
Facebook
X
Pinterest
Email
Other Apps
#include<iostream>
#include<fstream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
ifstream in("namedalbuminfo.txt");
if(!in){
cerr << "Failed to load input file!" << endl;
return 1;
}
ofstream out("namedtracklist.txt");
string line;
int hours, mins, sum_hrs = 0, sum_mins = 0, count = 0, diff;
getline(in, line);
out << "Album title: " << line << endl;
getline(in, line);
out << "Artist: " << line << endl;
cout << "Welcome to 's tracklist generator!" << endl;
out << "Tracks:" << endl;
out << "--------------------------------------------------" << endl;
while(!in.eof()){
count ++;
getline(in, line);
in >> hours >> mins;
in.ignore();
out << setfill('0') << setw(2) << count;
out << " - " << line << ' ';
out << hours << ':' << mins << endl;
sum_hrs += hours;
sum_mins += mins;
diff = sum_mins - 60;
if(0 < diff){
sum_hrs ++;
sum_mins = diff;
}
}
out << "--------------------------------------------------" << endl;
in.close();
out.close();
cout << "Processed " << count << " tracks." << endl;
cout << "Total album length: " << sum_hrs << ':' << sum_mins << endl;
cout << "Notes and Comments" << endl;
return 0;
}
Bows + Arrows
The Walkmen
What's in It for Me
2 53
The Rat
4 27
No Christmas While I'm Talking
4 30
Little House of Savages
3 15
My Old Man
4 46
138th Street
3 2
The North Pole
3 48
Hang On, Siobhan
3 45
New Year's Eve
2 20
Thinking of a Dream I Had
4 33
Bows + Arrows
5 16
Introduction: Before you can start coding in PHP, you need to set up the development environment by installing PHP on your machine. In this blog post, we'll walk you through the process of installing PHP on different operating systems, ensuring you have everything you need to begin your PHP programming journey. Table of Contents: 1. Installing PHP on Windows 2. Installing PHP on macOS 3. Installing PHP on Linux 4. Verifying the PHP Installation 5. Configuring PHP Let's dive into each section and learn how to install PHP on your preferred operating system. 1. Installing PHP on Windows: Step-by-step instructions on installing PHP on a Windows machine. We'll cover the installation of XAMPP, a popular PHP development environment that includes Apache, MySQL, and PHP. 2. Installing PHP on macOS: A detailed guide on installing PHP on macOS using Homebrew, a package manager for macOS. We'll walk you through the installation of PHP and configuring Apache. 3. Installing PHP on ...
Comments
Post a Comment