Question

In: Computer Science

Create a C program that will test the following : Theory (0-70): 65 Laboratory (0-30): 25...

Create a C program that will test the following :
Theory (0-70): 65
Laboratory (0-30): 25
Total Marks: 90

Solutions

Expert Solution

#include <stdio.h>
int main()
{
    int theory_marks,lab_marks,total_marks;

    // take input of theory marks
    printf("Enter theory marks out 70: ");
    scanf("%d",&theory_marks);

    // take input of lab marks
    printf("Enter Laboratory marks out of 30: ");
    scanf("%d",&lab_marks);

    // sum the theory and lab marks
    total_marks=theory_marks+lab_marks;

    // output the total marks
    printf("\nTotal marks out of 100: %d ",total_marks);

    return 0;

}

PLEASE LIKE THE SOLUTION :))

IF YOU HAVE ANY DOUBTS PLEASE MENTION IN THE COMMENT


Related Solutions

For this project, you will create a program in C that will test the user’s proficiency...
For this project, you will create a program in C that will test the user’s proficiency at solving different types of math problems.   The program will be menu driven. The user will select either addition, subtraction, multiplication or division problems. The program will then display a problem, prompt the user for an answer and then check the answer displaying an appropriate message to the user whether their answer was correct or incorrect. The user will be allowed 3 tries at...
How much heat is required to heat 25 g of ice at -30°C to 70°C? H2O(s)...
How much heat is required to heat 25 g of ice at -30°C to 70°C? H2O(s) s = 2.0 J/(g°C) H2O(l) s = 4.18 J/(g°C) ΔH fus = 6.01 kJ/mol
Create a C++ program that will ask the user for how many test scores will be...
Create a C++ program that will ask the user for how many test scores will be entered. Setup a while loop with this loop iteration parameter. (no fstream) The data needs to include the student’s first name, student number test score the fields should be displayed with a total width of 15. The prompt should be printed with a header in the file explaining what each is: ex. First Name student number Test Score 1) mike 6456464   98 2) phill...
In c++ create a program that asks for tire shop sales numbers made by 0 to...
In c++ create a program that asks for tire shop sales numbers made by 0 to 20 employees Premium tires sell for $300 and standard tires sell for $250 The wholesale cost of premium tires is $120 and the standard is $100 The program must ask for each employee's name and then the amount of premium and standard tires sold. Output the name and the total profit each employee made for the shop Output the total profits earned between all...
D. Find a linear (regression) equation with following data. x     y 70   25 65   20 60  ...
D. Find a linear (regression) equation with following data. x     y 70   25 65   20 60   30 50   35 45   40 Ans.: y = ( ) + ( ) * x.   Show your work.
(1) (2) (3) DI C DI C DI C $0 $4 $0 $65 $0 $2 10...
(1) (2) (3) DI C DI C DI C $0 $4 $0 $65 $0 $2 10 11 80 125 20 20 20 18 160 185 40 38 30 25 240 245 60 56 40 32 320 305 80 74 50 39 400 365 100 92 Refer to the given consumption schedules. DI signifies disposable income and C represents consumption expenditures. All figures are in billions of dollars. At an income level of $40 billion, the average propensity to consume is...
********************C# C# C#******************** Part A: Create a project with a Program class and write the following...
********************C# C# C#******************** Part A: Create a project with a Program class and write the following two methods(headers provided) as described below: 1. A Method, public static int InputValue(int min, int max), to input an integer number that is between (inclusive) the range of a lower bound and an upper bound. The method should accept the lower bound and the upper bound as two parameters and allow users to re-enter the number if the number is not in the range...
You will create a datafile with the following information: 70 80 90 55 25 62 45...
You will create a datafile with the following information: 70 80 90 55 25 62 45 34 76 105You will then write the program to read in the values from the datafile and as you read in each number, you will then evaluate it through an if statement for the weather of the day. For example, when you read in the value 70 from the datafile, you should print to the screen that the temperature is 70° and it is...
Consider the following hypothesis test: H 0:   50 H a:  > 50 A sample of 65 is used...
Consider the following hypothesis test: H 0:   50 H a:  > 50 A sample of 65 is used and the population standard deviation is 7. Use the critical value approach to state your conclusion for each of the following sample results. Use  = .05. a. With  = 52.5, what is the value of the test statistic (to 2 decimals)? Can it be concluded that the population mean is greater than 50? SelectYesNoItem 2 b. With  = 51, what is the value of the test statistic...
Create a C program that performs the following (please comment the codes): a) Create a Stack...
Create a C program that performs the following (please comment the codes): a) Create a Stack ADT. Stack should be implemented using the linked list. b) Enter 10 random integer numbers between 0 to 50 in the stack. c) After pushing each element, print the content of the top of the stack. c) Then pop out those 10 integer numbers and print those numbers. d) Finally destroy the Stack.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT