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

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...
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...
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.
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...
Q1) Please create a C++ program that will ask the user for how many test scores...
Q1) Please 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. The data will include the student’s first name, Wayne State Access ID, midterm score and their favorite team (i.e. – Doug, hg1702, 92, Wolverines * - John, hv2201, 99, Warriors). Print out the completed test scores to a file (midTermScores.txt) . Adjust the output as follows: (15 points) a. Scores with the...
I am trying to create a makefile for the following program in Unix. The C++ program...
I am trying to create a makefile for the following program in Unix. The C++ program I am trying to run is presented here. I was wondering if you could help me create a makefile for the following C++ file in Unix and show screenshots of the process? I am doing this all in blue on putty and not in Ubuntu, so i don't have the luxury of viewing the files on my computer, or I don't know how to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT