1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Montano1993 [528]
3 years ago
12

Modify the code below to do the following:

Computers and Technology
1 answer:
Kitty [74]3 years ago
7 0

Answer:

The code is appropriately given below with comments for better understanding

Explanation:

#include <linux/init.h>

#include <linux/module.h>

#include <linux/kernel.h>

#include <linux/hash.h>

#include <linux/gcd.h>

#include <asm/param.h>

#include <linux/jiffies.h>

/* This function is called when the module is loaded. */

static int simple_init(void)

{

  printk(KERN_INFO "Loading Module\n");

  printk(KERN_INFO "These are the HZ: %d\n", HZ);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

  printk(KERN_INFO "Golden Ratio is: %lu\n", GOLDEN_RATIO_PRIME);  

  return 0;

}

/* This function is called when the module is removed. */

static void simple_exit(void) {

  printk(KERN_INFO "Removing Module");

  unsigned long a = gcd(3300, 24);

  printk(KERN_INFO "Greatest Common Denominator between 3,300 and 24 is: %lu\n", a);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

}

/* Macros for registering module entry and exit points. */

module_init( simple_init );

module_exit( simple_exit );

MODULE_LICENSE("GPL");

MODULE_DESCRIPTION("Simple Module");

MODULE_AUTHOR("SGG");

You might be interested in
How much does 1 American tank cost on gas for a regular mission? Depending on your answer, I will give you the right amount of p
dem82 [27]
Most of the cars or other vehicles in the United States regularly have tanks that can hold up to 12 gallons worth of gas. The price of gas in not consistent. Sometimes prices are high and sometimes prices are low. Just like to day the price of a gallon is worth $2.2. But in an average, gas costs $3.8 per gallons. Therefore, on a regular basis a standard American which can hold 12 gallons costs $46.2.
5 0
3 years ago
Write a function gcd in assembly language, which takes two parameters, calculates and returns the gcd of those two numbers. You
Inga [223]

Answer:

Explanation:

The following is written in Java. It creates the function that takes in two int values to calculate the gcd. It includes step by step comments and prints the gcd value to the console.

       public static void calculateGCD(int x, int y) {

           //x and y are the numbers to find the GCF which is needed first

           x = 12;

           y = 8;

           int gcd = 1;

           //loop through from 1 to the smallest of both numbers

           for(int i = 1; i <= x && i <= y; i++)

           {

               //returns true if both conditions are satisfied

               if(x%i==0 && y%i==0)

                   //once we have both values as true we store i as the greatest common denominator

                   gcd = i;

           }

           //prints the gcd

           System.out.printf("GCD of " + x + " and " + y + " is: " + gcd);

       }

4 0
3 years ago
Lesson 3: Wrapping Up Unit 6
GrogVix [38]

Answer:

A visual representation of colors arranged according to their hues, or the chromatic relation they share

Explanation:

7 0
3 years ago
Read 2 more answers
Please help me, I'll give you 15 points.
babunello [35]
Yep same, i don’t know what to write abt it is jus saying what to write and now what abt
4 0
3 years ago
Write a program in python that can compare the unit (perlb) cost of sugar sold in packages with different weights and prices. Th
Dmitrij [34]

Answer:

weight1 = float(input("Enter the weight of first package: "))

price1 = float(input("Enter the price of first package: "))

weight2 = float(input("Enter the weight of second package: "))

price2 = float(input("Enter the price of second package: "))

if weight1 > 0 and price1 > 0 and weight2 > 0 and price2 > 0:

   unit_cost1 = price1 / weight1

   unit_cost2 = price2 / weight2

   

   if unit_cost1 < unit_cost2:

       print("Package 1 has a better price.")

   else:

       print("Package 2 has a better price.")

else:

   print("All the entered values must be positive!")

Explanation:

*The code is in Python.

Ask the user to enter the weight and the price of the packages

Check if the all the values are greater than 0. If they are, calculate the unit price of the packages, divide the prices by weights. Then, compare the unit prices. The package with a smaller unit price has a better price.

If all the entered values are not greater than 0, print a warning message

8 0
3 years ago
Other questions:
  • Click _______ to view each individual record of a mail merge document.
    5·2 answers
  • C programming: loading a dictionary into a trie data structure. Why am I segfaulting?
    8·1 answer
  • ____ is (are) the abuse of e-mail systems to send unsolicited e-mail to large numbers of people.
    14·1 answer
  • What permission do users have by default regarding printer access and the ability to manage documents?
    14·1 answer
  • Write a modular program that accepts up to 20 integer test scores in the range of 0 to 100 from the user and stores them in an a
    9·1 answer
  • Cú pháp câu lệnh xóa thủ tục
    12·1 answer
  • What is the main advantage of using a WYSIWYG("what you see is what you get")editor when constructing a website
    5·1 answer
  • Which term describes the surrounding area of this image?
    10·1 answer
  • Write a program that prompts the user to enter a fraction in the following format (x/y). You may assume that the user will input
    15·1 answer
  • A document that summarizes and displays data is called a: Group of answer choices Report Procedure Form Requirement
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!