473,699 Members | 2,191 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Switch-Case Statement Help

1 New Member
Hey I'm new to linux, and for an assignment I have to make a switch case statement to output microprocessor workload. When the script is run it should output one of the following results:

>83 - over work load
>75 - medium work load
>50 - average workload
<50 - under working
Nov 24 '07 #1
2 5636
rajarora
33 New Member
Hey I'm new to linux, and for an assignment I have to make a switch case statement to output microprocessor workload. When the script is run it should output one of the following results:

>83 - over work load
>75 - medium work load
>50 - average workload
<50 - under working
Hi,
Could you please describe some details of the problem. I think only then it will be better reply.
Regards,
Raj Kumar Arora
Dec 19 '07 #2
Motoma
3,237 Recognized Expert Specialist
Hey I'm new to linux, and for an assignment I have to make a switch case statement to output microprocessor workload. When the script is run it should output one of the following results:

>83 - over work load
>75 - medium work load
>50 - average workload
<50 - under working
Welcome to The Scripts gooner.
There are two problems with your question: A) you have not described what language you are trying to do this in, and B) you have not posted the work you have already done.
Please respond with those two pieces of information so that we may better help you.
Motoma
Dec 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

14
2609
by: Rudi Hansen | last post by:
I dont seem to be able to find the switch statement in Python. I would like to be able to do switch(var) case 1 : print "var = 1" case 2: print "var = 2"
3
1841
by: James Stroud | last post by:
Hello All, Because of my poorly designing a database, I have recently found it necessary to explore the wonders of the Python pseudo-switch: do_case = { "A" : lambda x: x, "B" : lambda x: x, "C" : lambda x: "Ted", "D" : lambda x: do_something(x) }
3
10830
by: Mike Wiseley | last post by:
I created a desktop shortcut with "C:\Program Files\Microsoft Office\MSAccess.exe" "C:\My Documents\CopyAToB.mdb" /pwd "password: The trouble is that when running this shortcut, it prompts first for a Logon, asking for user name and password -- then it prompts for the database password. (Two password prompts). I am using very simple Access security -- no special user groups, etc...just a simple password to open the MDB file. To solve,...
10
1987
by: Eric | last post by:
I have a pet project I'm working on. I start in DOS in assembly, switch to protected mode and play around with things in that environment. I'm wondering if i started at main in a C program then called the assembly stuff to switch to pmode if i could then use some of C's functions in pmode? Thanks Eric
13
7460
by: William Stacey | last post by:
Using the following code sample: public byte Get() { // <= Possible to switch Here?? lock(syncLock) { //Do something in Get(). } }
5
3686
by: Nadav | last post by:
Hi, I am using FileStream's Async API: BeginRead/EndRead, upon completion callback execution I use the read data and call EndRead, Taking that in mind, I Wonder... does calling EndRead will cause a context switch? What is the kernel object used for blocking EndRead calls? Event and mutex cause a context switch even when the object is signaled and no wait is needed, usage of critical section prevent this switch from happening... what is the...
18
1927
by: Torben Laursen | last post by:
Hi Can anyone tell me what is the short-cut to switch between a .h and .cpp file, thanks Torben Laursen ---
3
2810
by: Lee Chapman | last post by:
Hi, I want my ASP.NET web application to use a custom HtmlTextWriter. i.e. I want the object that the Framework passes to System.Web.UI.Control.Render() to be my own object, MyHtmlTextWriter, which inherits from System.Web.UI.HtmlTextWriter. I have tried to do this by changing my application's web.config file: I've added the following to the /configuration/system.web section.
8
1509
by: pickedaname | last post by:
I work for a telecom company. We need to get data from our 5ESS switches to be consumed by a .NET app. The data I am getting back is incomplete. For example, the beginning of the first line recvd from the device should read: SWT5 5e16(2) 02.00 Instead I get a bunch of gibberish then SWT5
11
10857
by: Peter Kirk | last post by:
Hi i have a string variable which can take one of a set of many values. Depending on the value I need to take different (but related) actions. So I have a big if/else-if construct - but what is a better way of doing this? if ("control" == commandString) { } else if ("execute" == commandString)
0
8621
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9184
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9042
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7759
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5878
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2357
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.