# Basic calendar for beginners

Discussion in 'C, C++, C#' started by fatjack'sblackhat, Oct 1, 2013.

1. ### fatjack'sblackhatPower Member

Joined:
Jul 16, 2008
Messages:
624
131
Occupation:
college student
Location:
Florida
I am a beginner and Im taking Intro to c right now at the university of central florida. This is a simple calendar I learned about a week ago. Im sharing it with you all to help those who are struggling with the concept of nested for loops:
Code:
```#include<stdio.h>
#include<stdlib.h>

int main(void)
{
int i, n, s;

printf("What day do you want your month to start?<A number>\n");
scanf("%d", &s);

printf("How many days are in the month?\n");
scanf("%d", &n);

printf("_S_M_T_W_T_F_S_\n");

for(i=1; i<=n; i++)
{

if(i>9)
printf("%d", i);

else
printf(" %d", i);

if((i+s-1%7)==0)
printf("\n");

}

getchar();
while(getchar()!='\n')
return 0;
}```

2. ### lancisElite Member

Joined:
Jul 31, 2010
Messages:
1,683
2,427
Occupation:
Entrepreneur
Location:
Milky Way
Funny.
Check the C++ course page on the University of Central Florida website.

http://www.ce.ucf.edu/Program/3118/Introduction-To-C-Programming/

Its full of spun fake student reviews. For example:

• Thanks x 3
3. ### fatjack'sblackhatPower Member

Joined:
Jul 16, 2008
Messages:
624
131
Occupation:
college student
Location:
Florida
I can tell you I was NOT comfortable with the material starting out. LOL that is hilarious that UCF has fake reviews

4. ### bartosimpsonioJr. VIPJr. VIPPremium Member

Joined:
Mar 21, 2013
Messages:
13,685
12,299
Occupation:
MACHIN LURNIN
Location:
TUVALU
It seems like no place is immune from fake reviews these days.

If running linux, go to your comman line and type in cal

Nice little standard text-based calendar similar to yours.

5. ### LogicianBANNEDBANNED

Joined:
Apr 4, 2013
Messages:
584
582
Ha thats crazy they have fake reviews.

OP keep this thread updated on your learning success. I've been thinking about taking a close on this too.

Joined:
Sep 28, 2011
Messages:
5,067