what are the two basic styles of firearm actions [Solved]

Question 1

For this Project, you will create a function called getTemperatures(). The getTemperatures() function will have one parameter called temperatures[].Within the getTemperatures() function you will populate the temperatures array with the following values: 10,15,20,25,30,32,40,45,50,55,60,65,70. Your main program will traverse through the array and display the Fahrenheit and Celsius equivalents.

Expected output
10 degrees Fahrenheit is -12 degrees Celsius

10 degrees Celsius is 50 degrees Fahrenheit

15 degrees Fahrenheit is -9 degrees Celsius

15 degrees Celsius is 59 degrees Fahrenheit

20 degrees Fahrenheit is -6 degrees Celsius

20 degrees Celsius is 68 degrees Fahrenheit

25 degrees Fahrenheit is -3 degrees Celsius

25 degrees Celsius is 77 degrees Fahrenheit

30 degrees Fahrenheit is -1 degrees Celsius

30 degrees Celsius is 86 degrees Fahrenheit

35 degrees Fahrenheit is 1 degrees Celsius

35 degrees Celsius is 95 degrees Fahrenheit

40 degrees Fahrenheit is 4 degrees Celsius

40 degrees Celsius is 104 degrees Fahrenheit

45 degrees Fahrenheit is 7 degrees Celsius

45 degrees Celsius is 113 degrees Fahrenheit

50 degrees Fahrenheit is 10 degrees Celsius

50 degrees Celsius is 122 degrees Fahrenheit

55 degrees Fahrenheit is 12 degrees Celsius

55 degrees Celsius is 131 degrees Fahrenheit

60 degrees Fahrenheit is 15 degrees Celsius

60 degrees Celsius is 140 degrees Fahrenheit

65 degrees Fahrenheit is 18 degrees Celsius

65 degrees Celsius is 149 degrees Fahrenheit

70 degrees Fahrenheit is 21 degrees Celsius

70 degrees Celsius is 158 degrees Fahrenheit


Question 2

a pan of water is heated from 27 degrees celsius to 77 degrees celsius. what is the change in temperature on the fahrenheit scale?
Question 3


Question 4


Answer to question 1

using System;

class Program
{
    
    static void Main()
    {
       int c, f;
int[]  temperatures = new int[13] ;
getTemperatures(temperatures );
for(int i=0;i<temperatures.Length;i++) {
     f = (9*temperatures[i])/5 + 32;
     c = (temperatures[i]-32) * 5/9;
        Console.WriteLine(temperatures[i]+” degrees Fahrenheit is “+c+” degrees Celsius”);
        Console.WriteLine(temperatures[i]+” degrees Celsius is “+f+” degrees Fahrenheit”);
}
    }
    static void getTemperatures(int[] temperatures ) {
       
        for(int j=0,i=10;i<=70;i+=5) {
           
            temperatures[j++] = i;
        }
    }
}
 

Output:

10 degrees Fahrenheit is -12 degrees Celsius
10 degrees Celsius is 50 degrees Fahrenheit
15 degrees Fahrenheit is -9 degrees Celsius
15 degrees Celsius is 59 degrees Fahrenheit
20 degrees Fahrenheit is -6 degrees Celsius
20 degrees Celsius is 68 degrees Fahrenheit
25 degrees Fahrenheit is -3 degrees Celsius
25 degrees Celsius is 77 degrees Fahrenheit
30 degrees Fahrenheit is -1 degrees Celsius
30 degrees Celsius is 86 degrees Fahrenheit
35 degrees Fahrenheit is 1 degrees Celsius
35 degrees Celsius is 95 degrees Fahrenheit
40 degrees Fahrenheit is 4 degrees Celsius
40 degrees Celsius is 104 degrees Fahrenheit
45 degrees Fahrenheit is 7 degrees Celsius
45 degrees Celsius is 113 degrees Fahrenheit
50 degrees Fahrenheit is 10 degrees Celsius
50 degrees Celsius is 122 degrees Fahrenheit
55 degrees Fahrenheit is 12 degrees Celsius
55 degrees Celsius is 131 degrees Fahrenheit
60 degrees Fahrenheit is 15 degrees Celsius
60 degrees Celsius is 140 degrees Fahrenheit
65 degrees Fahrenheit is 18 degrees Celsius
65 degrees Celsius is 149 degrees Fahrenheit
70 degrees Fahrenheit is 21 degrees Celsius
70 degrees Celsius is 158 degrees Fahrenheit


Answer to question 2


Answer to question 3

#define _CRT_SECURE_NO_DEPRECATE

#include<stdio.h>

//this function return populates temperature array with values

void  getTemperatures(int temperatures[]);

//array size

const int size = 13;

int main()

{

int temperatures[13];

//declare variable to hold iteration value in for loop

int i;

float celcius,fahren;

//call getTemperatures

getTemperatures(temperatures);

//display the results, formula to calculate farhenheit is T(°F) = T(°C) × 1.8 + 32 ,,from this we can calculate T(°C)  = (T(°F) -32)/1.8

for (i = 0; i < size; i++)

{

//convert to celcius

celcius = ((temperatures[i] – 32) *5)/9;

//convert celcius to fahrenheit

fahren = (temperatures[i] *9) / 5 + 32;

printf(“%d degress Fahrenheit is %.0f degress Celcius\n”, temperatures[i], celcius);

printf(“%d degress Celcius is %.0f degress Fahrenheit\n”, temperatures[i], fahren);

}

}

void  getTemperatures(int temperatures[])

{

int num = 10;

int i;

for ( i = 0; i< size; i++)

{

if ( i == 0)

temperatures[i] = num ;

else

temperatures[i] = temperatures[i-1]+ 5;

}

}

//output:

10 degress Fahrenheit is -12 degress Celcius

10 degress Celcius is 50 degress Fahrenheit

15 degress Fahrenheit is -9 degress Celcius

15 degress Celcius is 59 degress Fahrenheit

20 degress Fahrenheit is -6 degress Celcius

20 degress Celcius is 68 degress Fahrenheit

25 degress Fahrenheit is -3 degress Celcius

25 degress Celcius is 77 degress Fahrenheit

30 degress Fahrenheit is -1 degress Celcius

30 degress Celcius is 86 degress Fahrenheit

35 degress Fahrenheit is 1 degress Celcius

35 degress Celcius is 95 degress Fahrenheit

40 degress Fahrenheit is 4 degress Celcius

40 degress Celcius is 104 degress Fahrenheit

45 degress Fahrenheit is 7 degress Celcius

45 degress Celcius is 113 degress Fahrenheit

50 degress Fahrenheit is 10 degress Celcius

50 degress Celcius is 122 degress Fahrenheit

55 degress Fahrenheit is 12 degress Celcius

55 degress Celcius is 131 degress Fahrenheit

60 degress Fahrenheit is 15 degress Celcius

60 degress Celcius is 140 degress Fahrenheit

65 degress Fahrenheit is 18 degress Celcius

65 degress Celcius is 149 degress Fahrenheit

70 degress Fahrenheit is 21 degress Celcius

70 degress Celcius is 158 degress Fahrenheit


Answer to question 4

Leave a Comment