Yo!
i was wondering if anyone could give me an assignment to do i'm kinda stumped
on what i should work on next.....
to show some examples of what i've done so far:
simple interest calculator this one i made because i had to calculate a few different loans to choose from
and this one is so i can see how much space i have left on my drive
i can also do static and dynamic arrays and i've havn't even looked at how to make a windows API yet :/ so can you guys help me out by giveing me a program to make?
i was wondering if anyone could give me an assignment to do i'm kinda stumped
on what i should work on next.....
to show some examples of what i've done so far:
simple interest calculator this one i made because i had to calculate a few different loans to choose from
Code:
//by: falidell
#include <iostream>
#include <iomanip>
int main()
{
using namespace std;
long double interestp;
long double amount;
long double time;
long double interestm;
long double interestt;
long double totalm;
long double total;
char yn('y');
do{
cout << "Loan Amount : $";
cin >> amount;
cout << endl;
cout << "loan Time (months) :";
cin >> time;
cout << endl;
cout << "interest rate percent: ";
cin >> interestp;
cout << endl;
interestm = (amount/time)*(interestp/100);
interestt = (amount*(interestp/100));
totalm = (amount/time)+interestm;
total = amount+interestt;
cout << "Per Month:" << endl;
cout << " Interest: $" << setprecision (5) << interestm << endl;
cout << " Payments: $" << setprecision (5) << totalm << endl;
cout << endl;
cout << "Total:" << endl;
cout << " Interest: $" << setprecision (5) << interestt << endl;
cout << " Due: $" << setprecision (5) << total << endl;
cout << "another loan? (y/n) :";
cin >> yn;
cout << endl << endl << endl << endl;
}while(yn=='y' || yn=='Y');
return 0;
}
and this one is so i can see how much space i have left on my drive
Code:
// left over drive room
// i'm lazy so i made this HAHA
//by : falidell
//Includes!!!!!!!!!!!!!!
#include <iostream>
#include <iomanip>
//Useings and Global Variables!!!!!!
using namespace std;
//Actuall Work stuffs
void PercentUF(long double U, long double M)//Calculate free and used percentages
{
long double PU;
long double PF;
PU = (U/M)*100;
PF = 100-PU;
cout << endl;
cout << setprecision (4) << PU << "% Used";
cout << endl;
cout << setprecision (4)<< PF << "% Free";
cout << endl;
}
void GLOS(long double Used, long double Max , double Per)//get left over space
{
long double Have;
long double Space;
double Perc;
Perc = Per/100;
Space = (Max*Perc);
if(Used >= Space)
{
Have = Used - Space;
cout << endl << "you have no room!!!!!!";
cout << endl;
cout << "Get Rid of " << setprecision (8) << Have;
cout << " gigs to get back to the "<<Per<<"% range";
cout << endl;
cout << endl;
cout << endl;
cout << endl;
}
else
{
Have = Space-Used;
cout << "you Have " << setprecision (8) << Have << " gigs left";
cout << endl;
}
}
int main()
{
long double U;
long double M;
double P;
int I(1);
do {
top: // YES I KNOW i shouldn't use goto statements and such but i
//couldn't think of any other way to do this
system("cls");
cout <<"whats your Desired drive Use percent limit (1-100)?: ";
cin >>P;
if (P < 1 || P > 100)
{
cout << endl <<" that is not in the 1-100 range!!!!!";
cout << endl;
system("pause");
goto top;
}
cout <<endl<<"Whats the Max drive Cap: ";
cin >>M;
cout << endl << "how much is used? ";
cin >>U;
system("cls");
GLOS(U,M,P);
PercentUF(U,M);
cout << endl;
cout << endl;
cout << "Again? (1/0): ";
cin >> I;
} while ( I == 1);
return 0;
}
i can also do static and dynamic arrays and i've havn't even looked at how to make a windows API yet :/ so can you guys help me out by giveing me a program to make?
Last edited: