Need help with a c++ program

Sep 16, 2014 at 7:02pm
Please email me, I can't post my program here for plagiarism issues.
I've done half of it, I'll send it to you and the program details via email FRANKTHEMAN149@GMAIL.COM
Please help.
Sep 16, 2014 at 7:06pm
It's not possible to plagiarise your own work. The worst thing that can happen is a brief misunderstanding until you prove that you are the same person as this online identity.

Who is it that is checking for plagiarism? Can you not ask them for help?
Sep 16, 2014 at 7:46pm
The program is:
Build a calender for only 1 month
if you press 1 then the first day should be sunday, ... press 7 for first day to be saturday.
there should be another variable from 28 days to 31 days(as the total number of days in that month)
Ive done this much so far. please help me to do next CASEs and FOR LOOPs
#include <iostream>
#include <iomanip>
using namespace std;

int main(void)
{

int daysinmonth;
int daynumber;

cout << "Enter the number of days in the month: ";
cin >> daysinmonth;

cout << "Enter day of week on which month starts (1=Sun, 7=Sat): ";
cin >> daynumber;

if (daynumber < 1 || daynumber > 7 || daysinmonth < 28 || daysinmonth > 31)

{
cout << "You have entered an invalid start day or an invalid number of days in the month.\n";
cout << "Pleasy try again." << endl;
}
else if (daynumber >= 1 && daynumber <= 7 && daysinmonth >= 28 && daysinmonth <= 31)
{

cout << " Sun Mon Tue Wed Thu Fri Sat\n";
Sep 16, 2014 at 9:18pm
Please be sure to put code [code]between code tags[/code] so that it gets syntax highlighting and is easier to read.

Your else-if is redundant - the condition will always be true at that point in the code, so you should just use an else and not an else-if.

I would consider making an array to hold the names of the days of the week.

Your problem statement doesn't really go into much detail about what your program is supposed to actually do after getting the starting day and the number of days in the months - did you omit that information?
Sep 17, 2014 at 2:20pm
Looks like a school project :p
Sep 17, 2014 at 2:26pm
That's no reason not to help.
Sep 18, 2014 at 8:45am
True, but we need complete details on the Question
@frank: Provide more details on what you wanna achieve, we shall help ye out !
Topic archived. No new replies allowed.