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
inna [77]
3 years ago
12

How to write (c program) code for 30/4 = 7.5. It should print 7.5, not 7

Computers and Technology
1 answer:
trasher [3.6K]3 years ago
8 0

Answer:

The program to given question for get the output 7.5. We write the code like this

#include <stdio.h>

int main()         //define main method

{

 float a;             //declare a float variable.

 a=30.0/4;                   //a holding the value

 printf("the value of a= %f",a);           //print the value.

 return 0;

}

output:

7.500000

Explanation:

In the above program we declare a variable (a). That's datatype is   float because float datatype hold the decimal values.Then we assign the value to variable a that is already given in the question. Then we print the value by using printf() function.

So the output of the given question is 7.5.

You might be interested in
If you are parked on an incline with a manual transmission vehicle and your vehicle is facing downhill, you should put your vehi
emmainna [20.7K]
If you're parked between cars, it's preferable to just leave it in neutral: this way, if somebody bumps you, it doesn't harm the transmission. Just make sure you've got the handbrake firmly set.

<span>If on a hill, 1st gear if facing uphill; reverse if facing downhill. Just make sure to set the parking brake </span>before<span> releasing the clutch, so that the weight of the car is on the brake first; the gear is there only as a backup should the brake fail.</span>
4 0
3 years ago
(Count positive and negative numbers and compute the average of numbers) Write a program that reads an unspecified number of int
Papessa [141]

Answer:

Explanation:

Sorry it  is in Java, though you can covert it using converter

public class Exercise {

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int positives = 0;  // Count the number of positive numbers

 int negatives = 0;  // Count the number of negative numbers

 int count = 0;   // Count all numbers

 double total = 0;  // Accumulate a totol

 // Promopt the user to enter an integer or 0 to exit

 System.out.print("Enter an integer, the input ends if it is 0: ");

 int number = input.nextInt();

 if (number == 0) { // Test for sentinel value

  System.out.println("No numbers are entered except 0");

  System.exit(1);

 }

 while (number != 0) {// Test for sentinel value

  if (number > 0)

   positives++; // Increase positives

  else

   negatives++; // Increase negatives

  total += number; // Accumulate total

  count++;    // Increase the count

  number = input.nextInt();

 }

 // Calculate the average

 double average = total / count;

 // Display results

 System.out.println(

  "The number of positive is " + positives +

  "\nThe number of negatives is " + negatives +

  "\nThe total is total " + total +

  "\nThe average is " + average);

}

}

7 0
3 years ago
Which of the following statements about personality tests are true? Check all of the boxes that apply.
borishaifa [10]

Answer:

They evaluate a person’s personality traits And They can be used as self-assessment tools for career planning. are the answers.

4 0
4 years ago
A programmer completes the user manual for a video game she has developed and realizes she has reversed the roles of goats and s
lesya692 [45]

Answer:

Option C is correct.

Explanation:

The developer finalizes its client guide for such a pc game she might have created as well as discovers that she has changed the positions of sheep and goats across the whole article. Recognize the aim of a developer to modify both events of "goats" to "sheep" as well as all events of "sheep" to "goats." The developer will use an assumption that perhaps the term "foxes" would not exist anywhere else in the text.

The foregoing algorithms should be employed that achieve the aim of the author, which is to convert certain events of "goats" to "foxes." En, convert all events of "sheep" to "goats." Then, converts all events of "foxes" to "sheep."

4 0
3 years ago
Which of the statements below are true about Digital Signatures?
Leokris [45]

Answer:

The answer is "Option a, and c".

Explanation:

Following are the description of the Digital Signature choices:

  • To change the physical transportation of paper or link files in the computerized messaging system, some processes should be identified and utilized in digital signatures, which enables documentation to be validated unforgivably.
  • Using public-key cryptography, digital signatures, that's an exquisite system, that's why options a and b are correct.
  • Digital signatures are not a central authority, that's why the option B is wrong.
5 0
3 years ago
Other questions:
  • Given three dictionaries, associated with the variables, canadian_capitals, mexican_capitals, and us_capitals, that map province
    11·1 answer
  • 2. Identify the diagram and define it.<br>13. What are pollen grains ?<br>4. What is an embryo?​
    12·1 answer
  • To get revenge on the pizza parlor burning his pizza and not reimbursing him for it, David returned to the pizza parlor after-ho
    9·2 answers
  • ) write a program that creates a vector of string called "vec". vector "vec" grows and shrinks as the user processes the transac
    6·1 answer
  • Description A data retrieval tool that finds specified data within a database A collection of records All of the fields for a si
    7·1 answer
  • The pay of an hourly worker is calculated by multiplying the hours worked by the hourly rate—up to 40 hours; any hours worked be
    11·1 answer
  • Fill in the boxes to show two ways you can find 8+6​
    8·1 answer
  • Which option allows users to access the handout master to modify it?
    5·1 answer
  • Please explain what is Ribbon?  give examples​
    7·2 answers
  • Can someone please help? i am trying to code my raspberry pi pico in python, and it says this is wrong. Can someone help tell me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!