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
Wewaii [24]
3 years ago
8

Write a program to enter a number and test if it is greater than 45.6. If the number entered is greater than 45.6, the program n

eeds to output the phrase Greater than 45.6.
Sample Run
Enter a number: 90
Sample Output
Greater than 45.6
Computers and Technology
1 answer:
soldi70 [24.7K]3 years ago
8 0

Answer:

float inp =0;

cin>>inp;

if(inp > 45.6)

    cout<<"Greater than 45.6";

Explanation:

the first line will initialize an float for the input you gonna give the program.

second line will get the input from the user.

third line checks if the given input is greater than 45.6 .if so , it will print "greater than 45.6"

also for your future questions , please note which language your program should be in.

You might be interested in
The key uniquely identifies each record
gtnhenbr [62]

Primary :) i took the test

Plz make me brainliest

4 0
3 years ago
Create a list with 5 numbers and find the smallest and largest number in the list and also the sum and product of the numbers in
rusak2 [61]

Answer:

Explanation:

The following code is written in Java. It creates 5 random integers and saves them to a list called myList. Then it loops through that list and checks each one until the largest and smallest values are obtained. Finally, it uses these values to calculate the sums and products as requested. The program has been tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Random;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Random rand = new Random();

       ArrayList<Integer> myList = new ArrayList<>();

       for (int i = 0; i< 5; i++) {

           int mynum = rand.nextInt(20);

           myList.add(mynum);

       }

       int largest = myList.get(0);

       int smallest = myList.get(0);

       int sum = 0;

       int product = 1;

       int sumLargestandSmallest, productLargestandSmallest;

       for (int x : myList) {

           if (x > largest) {

               largest = x;

           }

           if (x < smallest) {

               smallest = x;

           }

           sum += x;

           product *= x;

       }

       sumLargestandSmallest = largest + smallest;

       productLargestandSmallest = largest * smallest;

       System.out.println("List" + Arrays.toString(myList.toArray()));

       System.out.println("Smallest: " + smallest);

       System.out.println("Largest: " + largest);

       System.out.println("Sum: " + sum);

       System.out.println("Product: " + product);

       System.out.println("Sum of Smallest and Largest: " + sumLargestandSmallest);

       System.out.println("Product of Smallest and Largest: " + productLargestandSmallest);

   }

}

6 0
3 years ago
Write a C++ program that reads students' names followed by their test scores. The program should output each students' name foll
Mashutka [201]

Answer:

#include<iostream>

#include<conio.h>

using namespace std;

struct studentdata{

char Fname[50];

char Lname[50];

int marks;

char grade;

};

main()

{

studentdata s[20];

for (int i=0; i<20;i++)

   {

cout<<"\nenter the First name of student";

cin>>s[i].Fname;

cout<<"\nenter the Last name of student";

cin>>s[i].Lname;

cout<<"\nenter the marks of student";

cin>>s[i].marks;

}  

 

for (int j=0;j<20;j++)

{

if (s[j].marks>90)

{

 s[j].grade ='A';

}

else if (s[j].marks>75 && s[j].marks<90)

{

   s[j].grade ='B';

}

else if (s[j].marks>60 && s[j].marks<75)

{

 s[j].grade ='C';

}

else

{

 s[j].grade ='F';

}

}

int highest=0;

int z=0;

for (int k=0;k<20; k++)  

{

if (highest<s[k].marks)

{

 highest = s[k].marks;

 z=k;

}

 

}

cout<<"\nStudents having highest marks"<<endl;

 

cout<<"Student Name"<< s[z].Fname<<s[z].Lname<<endl;

cout<<"Marks"<<s[z].marks<<endl;

cout<<"Grade"<<s[z].grade;

getch();  

}

Explanation:

This program is used to enter the information of 20 students that includes, their first name, last name and marks obtained out of 100.

The program will compute the grades of the students that may be A,B, C, and F. If marks are greater than 90, grade is A, If marks are greater than 75 and less than 90, grade is B. For Mark from 60 to 75 the grade is C and below 60 grade is F.

The program will further found the highest marks and than display the First name, last name, marks and grade of student who have highest marks.

6 0
3 years ago
Which statement below is inaccurate? a. Web 2.0 is a simple static website without any interaction with its users b. Web 2.0 bri
arsen [322]

Web 2.0 is a simple static website without any interaction with its users is inaccurate. This statement is accurate in web 1.0 and not 2.0

Further Explanation:

Web 1.0 is considered as the read-only web and represents the 1st implementation of the WWW. It allowed users to look for information online without offering an opportunity to fully interact with its pages. You only got the opportunity to passively read the content and that was it. The pages were static and were sometimes hosted on a free web hosting service.

Web 2.0 offers an interaction with its users. It is the read-write web technology as Berners-Lee would put it and it offers interoperability to its clients. It is what we interact with so much in our day-to-day lives. Examples of web 2.0 are the Wiki, FB, Twitter, and many more. These examples shows us how web 2.0 brings people closer together with information using machines and encourages participation and sharing of information.

Web 3.0 is not commonly used and is known to may as the future web. It is what many refer to as “IOT” or the semantic web. The world is slowly trying to transition into web 3.0 with smart devices trying to connect to the internet. It is trying to alter the web that humans are familiar with into some sort of database. It the web for the foreseeable future.

Learn more about web 2.0

brainly.com/question/10313994

#LearnWithBrainly

7 0
3 years ago
What is output if month = 11 and day = 14?
goldfiish [28.3K]

Cheese

…………………………..tggggggcfcgvgvv

4 0
3 years ago
Read 2 more answers
Other questions:
  • Long distances are usually measured in kilometers.<br> T or F?
    8·1 answer
  • What is scratch in information system .
    14·1 answer
  • A file extension of .xlsx means that the file contains what? *
    12·2 answers
  • Which of the following could be omitted from a company's AUP? A.Permissible lunchtime online activities B.Employees' home email
    15·2 answers
  • The code segment below is intended to randomly print one of the values 2, 4, 6, or 8 with equal probability.
    12·1 answer
  • The Electronic Communications Privacy Act requires an investigator to have a wiretap order to acquire ___________ information fr
    8·1 answer
  • ____________________ parameters are useful in three situations: • When the value of the actual parameter needs to be changed • W
    5·1 answer
  • Everytime my daughter tries to ask for an app, or a money thing inside an app.. The request won't go through. Anybody know how t
    12·1 answer
  • What pc games do you all play?
    14·2 answers
  • Data bars are a form of ________.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!