Member Avatar
#include <iostream> #include <iomanip> using namespace std; enum sizes{small, medium, large, jumbo}; sizes options(int drinkSize, int popcornSize); void printTotal(sizes price); int main() { int popcornSize, drinkSize; cout<<"Please pick the size of your popcorn: "<<endl; cout<<"1. Small"<<endl;cout<<"2. Medium"<<endl;cout<<"3. Large"<<endl;cout<<"4. Jumbo"<<endl; cin>>popcornSize; cout<<"Please pick the size of your Soda: "<<endl; cout<<"1. Small"<<endl;cout<<"2. …
by Popy_1 in Computer Science ()
Member Avatar
Part 2 of exploring/tasting the Swift language takes a look at dictionaries; process flow controls like loops, if/else and switch/case; functions and sorting. I hope I can follow this up with part 3, a closer look at class operations.
by vegaseat 1,720 in Computer Science ()
Member Avatar
I, and many others, desired a "switch" keyword in Python. For me it was to a desire to make some of my code more compact and readable, as I often have many user selected options for the code to weed through. So I set off on a journey to figure …
by BustACode 15 in Software Development ()
Member Avatar
Hello Daniweb Community, I have recently been thinking about switching from a Wi-Fi connection to a direct connection over ethernet, however when I tried an ethernet connection from my router to my PS4, I calculated the average download speed after about 5 Wi-Fi connection tests and 5 ethernet connection tests …
by joshl_1995 22 in Networking ()
Member Avatar
This time just a simple example of grading scores (0 - 100) with letters (A - F). Two approaches are presented, one using sitch/case in an "on the fly" function, and the other uses the score as an index to a string of letters F through A.
by vegaseat 1,720 in Computer Science ()
Member Avatar
I have to create a program that asks a person to enter a 2 digit number (10-99) and convert it into words. I've been working on this for days and I still don't see what I'm doing wrong! PLEASE HELP ME!!! EXAMPLE: 27 twenty-seven include &lt;iostream&gt; using namespace std; int …
by adoleh in Software Development ()
Member Avatar
So far I have this but I need to use switch statements to make age< certain numbers for each age group. ... Has to have 3 different outputs like this with different ages: ...
by DS9596 in Software Development ()
Member Avatar
The total bill doesn't add up correctly, don't get where I went wrong? Total bill is way off. ... Output: ...
by DS9596 in Software Development ()
Member Avatar
Not sure why it's not letting me choose the operation I want where I put "Enter an operation symbol..", I'm supposed to use switch statements to compute functions. ...
by DS9596 in Software Development ()
Member Avatar
Hi, I have a table in which I have Use ON and OFF status and I want to implement in laravell.What I have to do that it will work properly. Thanks!
by Sikander Nasar in Web Development ()
Member Avatar
I could think of half a dozen places this could start this conversation. I don’t believe the problem is hardware related, but the information that I am getting from my customer doesn’t convince me that it is vendor (AT&T DSL) related either. I maintain a small office with 5 computers …
by Paradise488 in Hardware and Software ()
Member Avatar
Here the switch() isn't working properly;not executing the function; & morever the while loop run twice when an invalid choice is given..
by kartikeswar.parida in Software Development ()
Member Avatar
I have a table that logs customer data but i want to search for the customer, upon finding that customer i want to click on the name and find it in another table that store other data. But here is where i am stuck i want to check which table …
by Ryan_11 in Web Development ()
Member Avatar
Hello everybody! I'm trying to count the number of occurrences of each word in a text file. Problem situation requires to realize menu using "switch" statement (If file exist or not). There are following errors in my program ("case b" and "default" is not working): [C++ Error] 03_int.cpp(61): E2126 Case …
by Auroch in Software Development ()
Member Avatar
So decided I should switch to VS13 for the added benefits. Copied the cold, transfered the files, alls good right? Wrong. Actually its not that bad. Just one main problem. See this fella? This is the one guy that is standing in the way of me and the debachury that …
by CreatorZeus in Software Development ()
Member Avatar
Hi,I am a beginner in php. And I am trying to create this php program where a user selects a picture and it displays it! Theare is an input page which is html and an processing page which is php! I seemes to have a problem in the processing page …
by ray100 in Web Development ()
Member Avatar
GNS3 is a Graphical Network Simulator that allows emulation of complex networks. You may be familiar with VMWare, VirtualBox or Virtual PC that are used to emulate various operating systems in a virtual environment. These programs allow you to run operating systems such as Windows XP Professional or Ubuntu Linux …
by rch1231 145 in Networking ()
Member Avatar
Okay so I have an class that accesses a static vector from my base class . I also have a class which inherits from . (Both Inventory and SwordShop are derived classes). So for example lets say the user adds into my vector and then adds another one. How can …
by Damian_2 in Software Development ()
Member Avatar
This program is supposed to run through the menus to eventually display the area or volume of a shape depending on the user's menu choices and input. However, it won't run the final menu and I'm not sure why. There aren't any problems when it goes through the debugger, it …
by Emma_3 in Software Development ()
Member Avatar
I have attached one code of my project and i need a help in that. The code is running without any error but i am stuck up in modifying that how to make a statement, of invalid format of date or time if the user enters the wrong format should …
by sam wage in Software Development ()
Member Avatar
Nice to meet you, i am a newbie i would like to ask a question that bothers me out : 1).How to add the decimal representation of N! (5 <= N <= 1,000,000) is simply the multiplicity of the prime factor 5 in N! to my script? 2). I wanted …
by muhammad_43 in Software Development ()
Member Avatar
Are there any just 10 Mbps Switches? I'm doing a assignment for school and we need to use a 10 Mbps switch But i dont know any. If there are can I have the names.
by NoCodeMonkey in Networking ()
Member Avatar
Am having problems converting from if-else statements to switch statements and vice-versa
by Ikanda Simeon in Software Development ()
Member Avatar
Write C++ a program that reads a person's age in years and print his/her age group. See the table below. Age Group name 1 year Childhood 2-3 years Infancy 4-5 years Preschool-Age 6–12 years School-Age 13–17 years Adolescence 18–29 years Young-Adulthood 30–39 years Thirties 40–64 years Middle-Age 56–48 years Aged …
by saja.omarii.7 in Software Development ()
Member Avatar
hi everyone i need your help, i ave a project where by i have to create a simple mortgage calculator. the problem is that i have to create a login frame where it will redirect me to the main frame which is the calculator.Could someone show me how to switch …
by Denmbithi in Software Development ()
Member Avatar
I know I have a fundamental problem, I do not fully understand List objects. Based on a user input from a list box I want to creat a different list named . I previously had issues with the function, seemed I was doing it at the class level, so I …
by Triryche in Software Development ()
Member Avatar
Hi all, am trying to use bootstrap switch in my form. Am at a lost as to how to get the value of from that field and insert it into mysql db, here is my code...
by dannybarh in Web Development ()
Member Avatar
Hello I have this code to detect the user browser, using if and else: &lt;?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) echo 'Internet explorer'; elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE) echo 'Mozilla Firefox'; ?&gt; Is there a way to do this using the switch statement? I tried this, and it does not work, it …
by ovidiu_b13 3 in Web Development ()
Member Avatar
can anyone help me fix my program?
by nikzer in Software Development ()
Member Avatar
**hi! i need help on fixing this program i made it seems that i can't let it run. Can someone give me some advice on what errors i have made and how i can fix it. thanks **
by nikzer in Software Development ()