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

  Explain the concepts of consumable and reusable resources

Explain the concepts of consumable and reusable resources

  Question about operating system interfaces

The Internet can be used for several reasons, including research and education, and information can be  achieved  from many types of Web sites.

  Question about security policy

ABC Corporation is a small but growing manufacturing corporation with revenues of approximately $25 million. Until now, the corporation has had a single headquarters and production facility in a Midwestern city,

  Selecting correct information system for trading futures

Discuss some of the many considerations in choosing the correct information system to use for trading futures and stocks?

  Ddos attack on router

Recently had a DDoS attack on border router. Discuss how would you estimate where the attack came from and what would you put in place to save it from happening again?

  Drawbacks and benefits of outsourcing

Discuss the drawbacks and benefits of outsourcing, which has become one of the hot issues today from the viewpoint of Quality Assurance.

  Question about virus defense

Discuss how can an individual machine get infected with the virus you are researching and how does it spread to other equipments?

  Identify issues of poor technology management

Assume you are the task manager for a large consumer service corporation consisting of 1,000 workers. You are responsible for 25 direct reports in your department.

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Value in managing security and risk

Explain ISO 27001's value in managing security and risk. What are the drawbacks and benefits for obtaining ISO 27001 certification?

  How many page faults are generated array-initialization loop

Illustrate how many page faults are generated by following array-initialization loops, using LRU replacement, and assuming page frame 1 has process in it, and the other two are initially empty?

  Designing and coding

Prepare a database with a table called tblNames and tbl Login. The tbl Names table should have the following columns.

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