First of all, i spouse u have good understanding of language and know how to code in C++, but u are struggling with these topics, so i will tell u methods to carry out these tasks, i wont go in depth, but i will explain basic methods u can use for this assignment;
1) u can use this method to open and edit files.
Code:
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.\n";
myfile.close();
return 0;
}
2) U can use this method to increase/decrease decimal points and after that its very simple to output em in order..
Code:
// number to decimal place
#include <iostream>
int main()
{
double x = 2.3767553235;
std::cout.precision(2);
std::cout << x << '\n';
system ("PAUSE");
return 0;
}
3) Sry dont know in C++ but i can sure tell u how to do that in Visual basic 2008
4) Simple use of loops, jst declare variables to take input and assign answer to a variable and output to screen, using loops as required.
5) same as number 4, only difference is, instead of loops this time u gota use if statements.
6) idk, i think u can use 1st method to open/write to a file, rest is upto u, u can either use if statements or loops,
umeed karta hoon aap ko samaj aa gai ho gi,
Bookmarks