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
An ant starts at one edge of a long strip of paper that is 34.2 cm wide. She travels at 1.3 cm/s at an angle of 61◦ with the lon
ankoles [38]

Answer:

t = 30.1 sec

Explanation:

If the ant is moving at a constant speed, the velocity vector will have the same magnitude at any point, and can be decomposed in two vectors, along directions perpendicular each other.

If we choose these directions coincident with the long edge of the paper, and the other perpendicular to it, the components of the velocity vector, along these axes, can be calculated as the projections of this vector along these axes.

We are only interested in the component of the velocity across the paper, that can be calculated as follows:

vₓ = v* sin θ, where v is the magnitude of the velocity, and θ the angle that forms v with the long edge.

We know that v= 1.3 cm/s, and θ = 61º, so we can find vₓ as follows:

vₓ = 1.3 cm/s * sin 61º = 1.3 cm/s * 0.875 = 1.14 cm/s

Applying the definition of average velocity, we can solve for t:

t =\frac{x}{vx} = \frac{34.2 cm}{1.14 cm/s} =30.1 sec

⇒ t = 30.1 sec

7 0
3 years ago
If an improvement creates no significant change in a product’s performance, then it is a(n) design improvement.
AlladinOne [14]

Answer:

Following are the responses to these question:

Explanation:

They might believe that it was an enhanced layout because the quality is not updated. For instance, its new XS Max iPhone does have a better display than the iPhone X, however, the performance wasn't enhanced. It also has the same processor or graphic cards however a bigger pixel every centimeter ratio. When its output AND is not altered, the layout doesn't change, basically the very same item.

7 0
3 years ago
Read 2 more answers
The in situ moist unit weight of a soil is 17.3 kN/m3 and the moisture content is 16%. The specific gravity of soil solids is 2.
Temka [501]

Answer:

Explanation:

Given that,

Moist content w = 16%

The in situ moist unit weight of the soil : γ(in situ) = 17.3 kN/m³

Specific gravity of the soil

G(s) = 2.72

Minimum dry unit weight of the soil

γd(compacted) = 18.1 kN/m³

Moist content is same as above

w = 16%

Question

how many cubic meters of soil from the excavation site are needed to produce 2000 m³ of compacted fill?

Let determine the in situ dry unit weight γd(in-situ) using the relation

γd(in-situ) = γ(in-situ) / [1 + (w/100)]

γd(in-situ) = 17.3/ [1 + (18/100)]

γd(in-situ) = 17.3 / ( 1 + 0.18)

γd(in-situ) = 17.3 / 1.18

γd(in-situ) = 14.66 kN/m³

To determine the Volume of the soil to be excavated (Vex)

Let the Volume to be excavated = V

We can use the relation

V=V(fill) × γd(compacted) / γd(in situ)

Given that, V(fill) = 2000m³

V(fill) is the volume of the compacted fill

Therefore,

V=V(fill) × γd(compacted) / γd(in situ)

Vex = 2000 × 18.1 / 14.66

Vex = 2469.13 m³

So, the excavated volume of the soil is 2469.13 m³

3 0
4 years ago
ITS A TESTS PLSSS I NEED THIS RN
Travka [436]

Answer:

Explanation:

ok is this multiple choice if so plz provide that and ill answer again

8 0
3 years ago
Which of the following statements regarding piston rings is false? Select one: a.
sveta [45]

Compression ring prevents pressurized refrigerant from blowing past the piston into the crankcase is the false statement.

Answer: Option A

<u>Explanation:</u>

Compression rings seal the combustion chamber from crankcase and then transfer heat to the cylinder from the piston. The piston rings are present in an internal combustion engine or steam engine with multi functions. The functions of piston rings are,

  • Ensuring the combustion chamber is tightly sealed as to reduce the loss of gas to crankcase .
  • Promoting heat transfer from the piston to cylinder wall .
  • Controlling engine oil consumption .
  • Optimizing the proper quantity of oil between piston and cylinder wall.
3 0
4 years ago
Other questions:
  • The term motion refers to a change in position with respect to a. a specific reference b. the ground c. the center of the Earth
    14·1 answer
  • Technician A says that as wheelbase becomes shorter in a highway truck, its resistance to yaw is
    14·1 answer
  • A house has a black tar, flat, horizontal roof. The lower surface of the roof is well insulated, while the upper surface is expo
    6·1 answer
  • The bulk modulus of a fluid if it undergoes a 1% change in volume when subjected to a pressure change of 10,000 psi is (a) 0.01
    13·1 answer
  • Jylan enjoys being in and around water. Based on his interests, which of the following careers might be enjoyable for him? dairy
    9·1 answer
  • An argument in science is most like a _______________________________.a. competition b. debate c. fight d. yelling match
    14·1 answer
  • A O.1m³ rigid tank contains steam initially as 500k pa and 200°C. The steam is now allowed to cool until the temperature drops t
    7·1 answer
  • It is an important part of the differential maintenance which purpose is to make smoother the differential operation by lubricat
    10·1 answer
  • How do I give brainless?
    14·1 answer
  • Concerning the storage battery, what category of the primary sources is voltage produced?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!