horoscope

we're making a simple program for a horoscope and we are asked to calculatethe year by getting only the 2 last digits in the year of birth.. how can i do that in C++? what am i suppose to do? needs suggestion please...can i use the gets_s?
Last edited on
We won't do your homework. If you need specific help we provide specific answers, but never entire homeworks.

Do as much as you can to the best of your knowledge. If that is not enough to complete the task, post what you have and explain what is failing and what would be the expected output/behavior.
closed account (3bfGNwbp)
i can do it for you ill post code soon
closed account (3bfGNwbp)
i dont want to give away the whole lesson, so I just made it do the quarters work of it. LOL

http://pastebin.com/h95hY2D6
thanks for the ideas..actually i made a code for it but it won't run..i'll post my code later...


tnx a lot :)
i got this code for min-max..but what if instead of 10, the user would enter a number N..what will be added to this codes?need some ideas please...

#include <iostream>
using namespace std;
int main ()
{
int mn,mx;
const int Numb = 10;
int a[Numb]; //10 elements
cout<<"Enter 10 values:"; //prompts user for 10 values.
for(int i=0;i<10;i++)
{
cout<< "\nEnter value: ";
cin>> a[i]; // puts values in array
}

mn=a[0];
mx=a[0];
for(int i=1;i<10;i++)
{
if(mn>a[i])
{
mn=a[i];
}
else if(mx<a[i])
{
mx = a[i];
}
}

cout<<"Maximum number is: "<< mx << endl;
cout<<"Minimum number is: "<< mn << endl;

return 0;

}
Topic archived. No new replies allowed.