122 Topics
|
|
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 [CODE]#include <iostream> using namespace std; int … |
|
#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. … |
|
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. |
|
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 … |
|
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 … |
|
This time just a simple example of grading scores (0 - 100) with letters (A - F). Two approaches are presented, one using switch/case in an "on the fly" function, and the other uses the score as an index to a string of letters F through A. |
|
So far I have this but I need to use switch statements to make age< certain numbers for each age group. #include <iostream> #include <iomanip> #include <string> using namespace std; const float CHILDREN_MALE=50.00; const float CHILDREN_FEMALE=55.00; const float TEENAGERS_MALE=150.00; const float TEENAGERS_FEMALE=155.00; const float ADULTS_MALE=275.00; const float ADULTS_FEMALE=250.00; int main() … |
|
The total bill doesn't add up correctly, don't get where I went wrong? Total bill is way off. #include <iostream> #include<cmath> #include <iomanip> #include <string> using namespace std; const float Small = 1.20; const float Medium = 1.50; const float Large = 1.70; const float less_inches = 3.75; const float … |
|
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. #include <iostream> #include<cmath> #include <iomanip> #include <string> using namespace std; int main() { int type; int a, b, c, d; char op; … |
|
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! |
|
|
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 … |
Here the switch() isn't working properly;not executing the function; & morever the while loop run twice when an invalid choice is given.. #include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #define MAX 100 int vowel_count(char*); int conso_count(char*); void to_lower(char*); void to_upper(char*); void menu(); int main() { int cnt=0; char data[MAX]=" "; bool flag=false; printf("Enter … |
|
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 … |
|
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 … |
|
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. `ltm` See this fella? This is the one guy that is standing in the way of me and the debachury … |
|
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 … |
|
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 … |
|
Okay so I have an `inventory` class that accesses a static vector from my base class `MainShop`. I also have a `SwordShop` class which inherits from `MainShop`. (Both Inventory and SwordShop are derived classes). //SwordShop class void SwordShop::Shop { //I have a setter function where it takes an integer and … |
|
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 … |
|
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 … |
|
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 … |
|
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. |
|
hey everyone, hope you people alright there. I got a computer lab and it is on 16 computer, had done networking and switches and everything of basic, what else I can do with the but dont have a server and i dont need one, but i want to apply some … |
|
Am having problems converting from if-else statements to switch statements and vice-versa |
|
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 … |
|
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 … |
|
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 `icons`. I previously had issues with the `switch` function, seemed I was doing it at the class level, so … |
|
Hi all, am trying to use bootstrap switch in my form. Am at a lost as to how to get the value of name="onoffswitch" from that field and insert it into mysql db, here is my code... div class="onoffswitch"> <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked> <label class="onoffswitch-label" for="myonoffswitch"> <div class="onoffswitch-inner"></div> … |
|
|
Hello I have this code to detect the user browser, using if and else: [CODE]<?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) echo 'Internet explorer'; elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE) echo 'Mozilla Firefox'; elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE) echo 'Google Chrome'; else echo 'Something else'; ?>[/CODE] Is there a way to do this using the … |
#include <cstdlib> #include <conio.h> #include <iostream> #include <stdlib.h> using namespace std; int main(int argc, char *argv[]) { int x,ctr; cout<< "Enter a day: "; cin>> x; for (ctr=x;x>0;x--) for (ctr=1;ctr<=12;ctr++) { switch (x) { case 1:cout<< "On the first day of Christmas\nMy true love sent to me...\n"; break; case 2:cout<< … |
The End.