Creating a c language code

Assignment Help Operating System
Reference no: EM1379573

Prepare a c code or Modify code to ask user to input five gpas. then the program computes the average of the gpa and prints it to screen. i.e(The average of all Gpas you entered is 3.87). this code should also check gor negative inputes ie( if user inputs -2.6 or a gpa hight or lower than 1 to 4.0, it print invalisd gpa to the screen.

#include <stdio.h>

main ()

/* This C code outputs the equivalent GPA letter grade of a student */
{
float x;

printf("Please enter a GPA value: n");
scanf("%f", &x);

/* An if else statement that sonditions the out of grades*/

if (x < 1.0)
{
Printf("A gpa of %.0f is a grade F: n", x);
}
else if (x >= 1.0 || x < 1.7)
{
Printf("A gpa of %.0f is a grade D: n", x);
}
else if (x >= 1.7 || x < 2.7)
{
printf("A gpa of %.0f is a grade C: n", x);
}
else if (x >= 2.7 || x < 3.5)
{
printf("A gpa of %.0f is a grade B: n", x);
}
else if (x >= 3.5)
{
printf("A gpa of %.0f is a grade A: n", x);
}
return (1);
}

 

Reference no: EM1379573

Questions Cloud

Provide security suggestions for laptop users : Andersen & Sons is a huge marketing company with four offices in the Chicago area. Each office has Windows Server 2003, and all servers are in a single domain.
Solving operating system problem : Assume a time sharing operating system allocated time slices of twenty milliseconds and the machine executed an average of 5000 instructions per microsecond.
Program to compute the signature : Assume Fred sees your RSA signaure on m1 and m2, (i.e., he sees (md1 mod n) and (md2 mod n).
Trends in information management : Assume you have been asked to join with many other IT professionals for an hour on the local cable channel, discussing some of the current trends in information management,
Creating a c language code : Prepare a c code or Modify code to ask user to input five gpas. then the program computes the average of the gpa and prints it to screen.
Describe function of operating system : Determine the functions that an operating system provides to make a computer run. Describe why that is an important feature and what an OS requires to be aware of to provide that service.
Requirements model for aims project : Need help in finalizing the requirements model for Airlines Information Management System (AIMS) project. The requirements model require to include use case diagrams for the entire AIM system.
Steps add to the check list : According to your personal experience, what steps would you add to the check list and determine what steps would you leave out?
Designing and coding : Prepare a database with a table called tblNames and tbl Login. The tbl Names table should have the following columns.

Reviews

Write a Review

Operating System Questions & Answers

  Optimal page replacement strategy

What is minimum number of page faults for the optimal page replacement strategy? Please show how the page is placed and how page faults occur.

  Differences between routers and switches

Assume you are currently working for Surebank, a medium financial institution. The company has approximately eighty people working in their main location where your office is located.

  Question about electronic monitoring

Give some discussion about Electronic checking, such as what is used in stores, through employers and by the public. Planning these questions in the response.

  Write a short report on page replacement algorithms

Select one of two possible short reports,  Subject 1. Page Replacement Algorithms and Block Caching,  Subject 2. Storing Blocks and Remembering Where You Stored Them

  Ethical issues of web site design

Analyze the user interaction interface of a typical website that you might wish to improve and design in terms of any ethical considerations that might require to be addressed.

  Explain the concepts of nat and ipv6

At present we have a huge problem with advertising corporations which are making profiles of people by collecting their information.

  Supporting a transmission system

A transmission system operates at sixteen MHz. The power output is 1 W and .1 Watt is needed at the receiver. The receiver is located one hundred meters from the transmitter.

  Write the start-up steps in windows nt

Write the start-up steps in Windows NT. Provide estimate for the capital investment needed in computer forensics for a 2,000,000 population.

  Analyse the different methods for collecting data

Analyse the different methods for collecting data Explain by taking examples 3 types of Sampling techniques.

  Implement the parser in two iterations

Implement the parser in a separate file. Implement the main parser function in a separate file main.c

  Creating er diagram

Construct a table for consumer. The manager tells me that this table needs to track the following data: all consumers' social security number, first and last name, address, city,

  Integrity without confidentiality

Determine the difference between message confidentiality and message integrity? Can you have confidentiality without integrity?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd