1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lisov135 [29]
3 years ago
9

Write a program that prints a one-month calendar. The userspecifies the number of days in the month and the day of the weekon wh

ich the month begins. The numerical dates must line up sothat the rightmost digit of the date is aligned with the rightmostdigit of the date above or below it (if there are anysuch). Below is an example output showing theformat you should use. The user input is shown as underlinedtext.Enter number of days in month: 31Enter starting day of the week (1=Sun, 7=Sat): 3 1 2 3 4 56 7 8 9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31This program isn’t as hard as it might seem. The mostimportant part is a for statement that uses a variable i to countfrom 1 to n, where n is the number of days in a month, printingeach value of i. Inside the loop, an if statement testswhether i is the last day in a week; if so, it prints anewline. Note that the two digit dates that start a week arealigned with the left margin.Here's what I have so far.#includeint main(){int i,days,start;printf("Enter number of days in month:",days);scanf("%d", &days);printf("Enter starting day of the week (1=Sun, 7=Sat):",start);scanf("%d", &start);for(i=1;i<=days;i++) { printf("%3d", i); if(i == 7 || i == 14 || i == 21 || i == 28) { printf("\n"); } }return 0;}
Engineering
1 answer:
Rama09 [41]3 years ago
8 0

Answer:

See explaination

Explanation:

#include<stdio.h>

#include<conio.h>

int main()

{

int days,start,i;

printf("Enter number of days in month: ");

scanf("%d",&days);

printf("Enter starting day of the week (1=Sun, 7=Sat):");

scanf("%d",&start);

printf("\nSun Mon Tue Wed Thu Fri Sat\n");

for(i=0;i<start-1;i++)

printf(" ");

for(i=1;i<=days;i++)

{ if (i<=9)

printf(" ");

printf("%d",i);

if ((start-1+i)%7==0&&i!=days)

printf("\n");

else

printf(" ");

}

printf("\n");

getch();

}

You might be interested in
How meny people live in new york
nydimaria [60]

Answer:

8.419 million (2019) at 2019

4 0
3 years ago
A hydraulic jump is formed in a 4m wide outlet just downstream of a control gate, which is located at the upstream end of the ou
cupoosta [38]

Answer:

Width w = 4m

Glow depth = y1 = 20m

Outlet discharge = 40m

V1= velocity of flow = 40/20*4 = 1/2 = 0.5m/s

Froud number = v1/√gy1

= 0.5/√9.81x20 = 0.0356

1. Y2/20 = 1/2[-1+√1+8*(0.0356)²]

Y2 = 0.05

2. Energy loss in the jump = (20-0.05)²/4x20x0.05

= 1985m

7 0
3 years ago
Dominic applies for a job in a robotics firm. One of the points in the job description is to have a good understanding of electr
pochemuha

Answer:

I Think It Is B

Explanation:

Because

5 0
3 years ago
Briggs &amp; Stratton engines feature both a pressure lubrication and a pressure filtration system. Which statement is true?
Andreyy89
Answer would be Letter B
7 0
3 years ago
Need the answer now- English<br>kailangan ang sagot ngayon-tagalog<br><br>mag practice tayo!<br>​
pychu [463]

Answer:

heirjfurifbhdnrgskeviebreo

7 0
3 years ago
Other questions:
  • Technician A says that applying too much braking force can cause tires to lose traction. Technician B says that ABS systems have
    7·1 answer
  • A stainless steel cap covers a drain in the dolphin tank which is 15 ft deep. The diameter of the hole is 3 in and the cap and w
    12·1 answer
  • Why does a foil airplane fly farther than a paper one?
    6·1 answer
  • An integrated circuit is a set of microscopic electronic circuits etched onto a thin slice of ________ material such as silicon.
    7·1 answer
  • Which type of design does not need special care for the placement of dimensions?
    5·1 answer
  • Name one challenge for engineering managers wanting to implement the concurrent engineering concept
    12·1 answer
  • An ordinary egg can be approximated as a 5.5-cm-diameter sphere. The egg is initially at a uniform temperature of 8°C and is dro
    6·1 answer
  • __is a mechanical force generated by a solid object moving through a fluid.
    13·1 answer
  • Which of the following actions by farmers contributes to desertification?
    6·1 answer
  • 1. A car engine transfers 3000J in 20 seconds. What is the power generated by the engine?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!