₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,923 members, 8,447,776 topics. Date: Saturday, 18 July 2026 at 11:48 PM

Toggle theme

Olarid01's Posts

Nairaland ForumOlarid01's ProfileOlarid01's Posts

1 2 3 4 5 6 (of 6 pages)

ProgrammingRe: Should A Programmer Marry A Programmer? by olarid01: 7:15am On Jul 03, 2016
galatico:
Yes if there is LOVE.
You know, it amazes me how people mistakes everything for love. Ask the grown-ups, you will know that common sense have to go along with LOVE
Love is amazing, but there are lot of things to consider when planning a family if you don't want to run into an abyss of doom.
Lets take this as an example:
You said you love your girl friend right? so you don't even bother to check your blood compatibility (Why? LOVE is above everything now.....)
At the end of the day, you are an "AS" and also your wife is an "AS".
What do you expect will be the result (A very likelihood of an "SS" offspring).
So who caused that? (bad luck?, God? your own fault?). So my brother LOVE is essential but not the only essential thing in marriage.
(Talking from findings and researches)

For a marriage
ProgrammingRe: Should A Programmer Marry A Programmer? by olarid01: 7:07am On Jul 03, 2016
Losing many girls "because you are a programmer" is actually because you work long hours. And, the thing about programming is that work isn't restricted to work hours. Bankers can leave their work in the office. A programmer can work in the office, in the bus on the way home, in bed, in the bathroom , ANYWHERE. So, given that you love your work, you'll do it a lot, and it might eat into your time for other things.

I plan to become a programmer in future, and, trust me, I'll still have time for other things.
My brother, you are just getting started
ProgrammingRe: Should A Programmer Marry A Programmer? by olarid01: 6:57am On Jul 03, 2016
candylips:
The heavens is not going to fall down if two programmers marry each other and beign a progammer is even not as brain demanding as say being a Maths or Theoritical Physics professor

I have seen one male Maths Professor married to another female Maths professor and they don't spend the whole day solving Quasilinear Partial differential equations to the Nth order in spatial space in the house
My brother, it seems you don't really know what programming is. undecided
ProgrammingRe: Opensource 3D Game Participation Call by olarid01: 10:56am On Jun 12, 2016
Cpp? I'm in
ProgrammingRe: Someone Should Help Me Solve This C++ Question Please by olarid01: 6:23pm On Jun 10, 2016
hardebayho:
For one bruh, I don't know c++. Two, the information she provided is not really clear to me.

Nice code though. That should do it
Thanks
ProgrammingRe: Someone Should Help Me Solve This C++ Question Please by olarid01: 1:17pm On Jun 10, 2016
olarid01:
Well done bro. But this won't take care of the two years and also it can be generalized so that the number of courses in each year will be requested at program start.

Take a look a this:




#include <stdafx.h>
#include <iostream>
using namespace std;

int main() {
char pause;
//Number of courses per year
int yone, ytwo;

const int NoOfStudents = 2;
cout << "\nHow Many Courses in Year One? " << "\t";
cin >> yone ;
cout << "\nHow Many Courses in Year Two? " << "\t";
cin >> ytwo ;


//Creating the student data structure
struct Genstudent{
float *Yearone;
float *Yeartwo;
};

//Creating Array of students for the number of students
Genstudent student[NoOfStudents];

//Initializing the students variables
for(int x = 0; x < NoOfStudents; x++){
student[x].Yearone = new float[yone];
student[x].Yeartwo = new float[ytwo];
}

//Getting All the Scores
for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student "<<x+1<<"\n";
cout<<"========="<<"\n";
for (int i=0; i<yone; i++){
cout<<"\n\tStudent"<<x+1<<": Input Score For Year 1 Course: "<<i+1<< "\t";
cin>>student[x].Yearone[i];
}
//getting the scores For Year two for all students
for (int i=0; i<ytwo; i++){
cout<<"\n\tStudent"<<x+1<<": Input Score For Year 2 Course: "<<i+1<< "\t";
cin>>student[x].Yeartwo[i];
}

}


//Printing All the Scores

// For Year ONE
cout << "\n\n\t\t The Scores For Year One Are\n";
cout << "\t\t === ====== === ==== === ===\n";

cout<<"\t\t";
for (int i=0; i<yone; i++){
cout<<"Course "<<i+1<<"\t";
}
//putting a line break
cout<<"\n";

for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student"<<x+1<<": "<<" \t";
for (int i=0; i<yone; i++){
cout<<student[x].Yearone[i]<<"\t\t";
}
cout<<"\n";
}

// For Year TWO
cout << "\n\n\t\t The Scores For Year Two Are\n";
cout << "\t\t === ====== === ==== === ===\n";

cout<<"\t\t";
for (int i=0; i<ytwo; i++){
cout<<"Course "<<i+1<<"\t";
}
//putting a line break
cout<<"\n";

for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student"<<x+1<<": "<<" \t";
for (int i=0; i<ytwo; i++){
cout<<student[x].Yeartwo[i]<<"\t\t";
}
cout<<"\n";
}
//Deallocating All the used Array
for(int x = 0; x < NoOfStudents; x++){
delete [] student[x].Yearone;
delete [] student[x].Yeartwo;
}
cin>>pause;
return 0;
}
The variable NoOfStudents can be changed to the required number (38)
but mind you inputting 5 as number of courses for year one and two will generated a input loop of 38*5*2
so, for testing sake, use small number
ProgrammingRe: Someone Should Help Me Solve This C++ Question Please by olarid01: 1:13pm On Jun 10, 2016
olarid01:
Well done bro. But this won't take care of the two years and also it can be generalized so that the number of courses in each year will be requested at program start.

Take a look a this:




#include <stdafx.h>
#include <iostream>
using namespace std;

int main() {
char pause;
//Number of courses per year
int yone, ytwo;

const int NoOfStudents = 2;
cout << "\nHow Many Courses in Year One? " << "\t";
cin >> yone ;
cout << "\nHow Many Courses in Year Two? " << "\t";
cin >> ytwo ;


//Creating the student data structure
struct Genstudent{
float *Yearone;
float *Yeartwo;
};

//Creating Array of students for the number of students
Genstudent student[NoOfStudents];

//Initializing the students variables
for(int x = 0; x < NoOfStudents; x++){
student[x].Yearone = new float[yone];
student[x].Yeartwo = new float[ytwo];
}

//Getting All the Scores
for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student "<<x+1<<"\n";
cout<<"========="<<"\n";
for (int i=0; i<yone; i++){
cout<<"\n\tStudent"<<x+1<<": Input Score For Year 1 Course: "<<i+1<< "\t";
cin>>student[x].Yearone[i];
}
//getting the scores For Year two for all students
for (int i=0; i<ytwo; i++){
cout<<"\n\tStudent"<<x+1<<": Input Score For Year 2 Course: "<<i+1<< "\t";
cin>>student[x].Yeartwo[i];
}

}


//Printing All the Scores

// For Year ONE
cout << "\n\n\t\t The Scores For Year One Are\n";
cout << "\t\t === ====== === ==== === ===\n";

cout<<"\t\t";
for (int i=0; i<yone; i++){
cout<<"Course "<<i+1<<"\t";
}
//putting a line break
cout<<"\n";

for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student"<<x+1<<": "<<" \t";
for (int i=0; i<yone; i++){
cout<<student[x].Yearone[i]<<"\t\t";
}
cout<<"\n";
}

// For Year TWO
cout << "\n\n\t\t The Scores For Year Two Are\n";
cout << "\t\t === ====== === ==== === ===\n";

cout<<"\t\t";
for (int i=0; i<ytwo; i++){
cout<<"Course "<<i+1<<"\t";
}
//putting a line break
cout<<"\n";

for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student"<<x+1<<": "<<" \t";
for (int i=0; i<ytwo; i++){
cout<<student[x].Yeartwo[i]<<"\t\t";
}
cout<<"\n";
}
//Deallocating All the used Array
for(int x = 0; x < NoOfStudents; x++){
delete [] student[x].Yearone;
delete [] student[x].Yeartwo;
}
cin>>pause;
return 0;
}
The value for the variable NoOfStudents can be changed to the number required (38)
but mind you, inputting the number of courses as 5 for each year will generate a loop of 38*5.......
so for testing sake, use small numbers
ProgrammingRe: Someone Should Help Me Solve This C++ Question Please by olarid01: 1:10pm On Jun 10, 2016
hardebayho:

#include <iostream>
using namespace std;

int main() {
int scores[38];

cout << "Enter 38 scores, and press enter after entering each score" << endl;

for(int x = 0; x < 38; x++){
cin >> scores[x] ;
cout << "The entered scores are: " << scores[x] << endl;
}
}


Tell me if this does what you need. If it doesn't, then I still need more info
Well done bro. But this won't take care of the two years and also it can be generalized so that the number of courses in each year will be requested at program start.

Take a look a this:




#include <stdafx.h>
#include <iostream>
using namespace std;

int main() {
char pause;
//Number of courses per year
int yone, ytwo;

const int NoOfStudents = 2;
cout << "\nHow Many Courses in Year One? " << "\t";
cin >> yone ;
cout << "\nHow Many Courses in Year Two? " << "\t";
cin >> ytwo ;


//Creating the student data structure
struct Genstudent{
float *Yearone;
float *Yeartwo;
};

//Creating Array of students for the number of students
Genstudent student[NoOfStudents];

//Initializing the students variables
for(int x = 0; x < NoOfStudents; x++){
student[x].Yearone = new float[yone];
student[x].Yeartwo = new float[ytwo];
}

//Getting All the Scores
for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student "<<x+1<<"\n";
cout<<"========="<<"\n";
for (int i=0; i<yone; i++){
cout<<"\n\tStudent"<<x+1<<": Input Score For Year 1 Course: "<<i+1<< "\t";
cin>>student[x].Yearone[i];
}
//getting the scores For Year two for all students
for (int i=0; i<ytwo; i++){
cout<<"\n\tStudent"<<x+1<<": Input Score For Year 2 Course: "<<i+1<< "\t";
cin>>student[x].Yeartwo[i];
}

}


//Printing All the Scores

// For Year ONE
cout << "\n\n\t\t The Scores For Year One Are\n";
cout << "\t\t === ====== === ==== === ===\n";

cout<<"\t\t";
for (int i=0; i<yone; i++){
cout<<"Course "<<i+1<<"\t";
}
//putting a line break
cout<<"\n";

for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student"<<x+1<<": "<<" \t";
for (int i=0; i<yone; i++){
cout<<student[x].Yearone[i]<<"\t\t";
}
cout<<"\n";
}

// For Year TWO
cout << "\n\n\t\t The Scores For Year Two Are\n";
cout << "\t\t === ====== === ==== === ===\n";

cout<<"\t\t";
for (int i=0; i<ytwo; i++){
cout<<"Course "<<i+1<<"\t";
}
//putting a line break
cout<<"\n";

for(int x = 0; x < NoOfStudents; x++){
//getting the scores For Year One for all students
cout<<"Student"<<x+1<<": "<<" \t";
for (int i=0; i<ytwo; i++){
cout<<student[x].Yeartwo[i]<<"\t\t";
}
cout<<"\n";
}
//Deallocating All the used Array
for(int x = 0; x < NoOfStudents; x++){
delete [] student[x].Yearone;
delete [] student[x].Yeartwo;
}
cin>>pause;
return 0;
}
ProgrammingRe: Someone Should Help Me Solve This C++ Question Please by olarid01: 3:15pm On Jun 09, 2016
Number of courses? of do you want it to be generalized?
And what type of paradigm to use? POP or OOP?
ProgrammingRe: Programmers, I Need Your Advice. by olarid01: 1:12pm On Jun 01, 2016
What type of company do you did your IT in?

1 2 3 4 5 6 (of 6 pages)