122 Topics
|
|
hi.. im an amateur in java and im having problems in switch statements.. i would appreciate if you would help me solve this problem.. [B]Problem:[COLOR="Red"] Write a java program that will let the user input 2 colors and display the result color..[/COLOR] [/B] [COLOR="Green"][B] This is what i come up … |
|
[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; // Functions int instructions(); int game(); //Types and Arrays string word[] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; char inst[50]; int main() { cout … |
|
Hi, I have this really important project where in, I must perform the following tasks. VIEW - view records that are present in the database using a "primary key" ADD - add new records to the database EDIT - a specific line in the said record within the database [INDENT]Under … |
|
how can i use a string in a switch statement? |
|
Hi, Since I starting dabbling in many areas of the tech world, I think I've lost some of the basic networking concepts I should already know. So I'm running into a problem: I came into a job with a network in place. After some issues, we had replaced some equipment … |
|
Hello. What I need is very simple in concept, although I am the worst in the world (not really) at JavaScript. I basically want to make a displayed image change, no special effects, every set amount of seconds. I also want to have a forward and backward image button to … |
|
I am trying to create a Unit Converter. My Idea is to have a select box at the top to select Length/Temp etc. which will populate the two select boxes below with appropriate units. The below code should Work only for Milimieters to Milimeter, Meters and Kilometers. It should show … |
|
Hi i seem to not be able to create a network between my wired and wireless computers at the office. My modem is connected into an 8-port switch. i have recently added a wireless router by connecting it to the 8 port switch. my computers that are connected through the … |
|
Hello. I've got a problem that I haven't been able to solve after a long time searching. It's a simple problem. I have two forms. 1) Form1 2) Form2 I need to get from Form1 to Form2 and vice versa. I can get from Form1 to Form2 easily, but I … |
|
So I made a few tutorial applications and understand the most basic Python concepts and I'm well on my way to become a Python addict, only one thing is standing between me and the road ahead. I'm trying to make my first "useful" Python application - a program that allows … |
|
|
Ok so this code works great with an if else statement but i dont why when i change the showMenu to a switch statement you cannot see my print out statement as a menu!? Iv tried different ways of writing the print outs and they havent worked at all. Also … |
i need help with the usage of round function.Can you help me? |
|
//Have to convert digits to words, having problems with the output. Please help. [CODE]#include<iostream> using std::cout; using std::cin; using std::endl; int numToText(int num) //function to return text version of number entered { switch (num/10) //Nested switch, this part detemines if number is multimple of ten { case 1: switch (num) … |
|
Hi all, I have written a basic program with 3 option using a switch statement, the 2nd option being a reverse string code using charAt() when you select option 2 and press enter it then switchs to case 2: which then asks for the string you wish to reverse, is … |
|
Hello. im a student working in C++ and im fairly new to both C++ and i guess this community.(i was reccomended to come here if i had problems) im just doing some simple exercises or s it seemed. here is the question. Write a C++ program with a case structure. … |
|
This program should have a menu:it can use a switch method ... MENU: [1]=ACCEPT; [2]=DISPLAY THE SMALLEST; [3]=DISPLAY THE LARGEST; [4]=DISPLAY THE SUM; [5]=DISPLAY ALL; [6]=EXIT; Could someone help me to this problem,and this program that i do i still encountering some errors..please do try to help me.. import java.util.*; … |
|
/** * @(#)List2.java * * * @author * @version 1.00 2010/8/26 */ import java.util.*; public class List2 { private int [] arr; private final int MAX = 10; public List2() { //allocate memory to arr arr = new int[MAX]; } //accept 10 numbers public void accept(){ Scanner console = new … |
|
I am writting a large if / else tree in an existing website. My include libraries have to be put into the html program using a scripting language called SpeedScript. These includes bring in the login data that I am testing in my if tree. Instead of using the if/else … |
|
hi all, Im trying to add a "title" to a switch case statement below, but for some reason im unable to complete, what I thought was a simple task. Hope someone can help and explaine the reasons why cheers, Lloyd [code] switch($ad) { case "add1.gif"; header("Location: http://www.google.co.uk"); break; case "add2.gif"; … |
|
I am currently trying to code an Operating System using the Cosmos user kit (Milestone 4). It's currently a console interface, and I am trying to allow parameters to the commands. The one I seem to be having trouble with is "Help". It's supposed to spit out available commands of … |
|
//Program that computes for the salary of the employee [CODE]#include <iostream> using namespace std; int main() { int EmployeeCode; float WeeklySalary, HourlyWage, NumHoursWorked, Overtime; cout<<"Enter Employee Code: "; cin>>EmployeeCode; if (EmployeeCode==1) { cout<<"Enter Weekly Salary: $ "; cin>>WeeklySalary; WeeklySalary = WeeklySalary; cout<<"Weekly Salary is: $ "<<WeeklySalary; } else if (EmployeeCode==2) … |
|
I'm trying to use a switch statement in my code but I'm having a bit of difficulty. I have an error message I do not understand and do not know how to fix. The message reads, "switch quantity not an integer". I'm new to C++ and would appreciate any help … |
|
how can we make a C++ program that identifies whether the user has input a vowel or a consonant specifically by using the SWITCH structure? i mean its simple with if-else but is there a way it can be made with switch and not if-else? |
|
hey guys i'm new to c and still learning.need some help here. i wrote this code and it isn't work properly,unable to figure out whats wrong!!but when the [B]strget()[/B] call from the main() its working.please some help... [CODE]main() { int x; printf("enter a value :"); scanf("%d",&x); switch(x) { case 1: … |
|
i have a piece of an unfinished program. try to run it... if you go straight to option 3 and input values, how do i output these values in option 4 ? i tried outputting my declared variables it wont work ? why is this ? i apologize the code … |
|
Ok this will be a easy to make game for pros but for new users it will improve your understanding of c#. Ok start my setting up your GUI(Generall User Interface) by selecting a trackerbar, 2 buttons, a label and a trackerbar. Place the trackerbar at the top of your … |
|
Hi I'm rather new to C++ and am rather confused about something. I noticed, say, in an "if else" statement or a "Switch" statement it only evaluates numerical expressions. In an If Else statement I can compare two strings by using a returned boolean result from say 'strcmp' but I … |
|
/*Hello, I am to create a program that gets a character and if it is uppercase, convert it to lowercase, if it is numeric print an error. I wrote the following code but my problem is that when I ask the user if he/she would like to quit, and I … |
|
Who says you don't get something for nothing? Certainly not the good people over at [URL="http://www.linuxfoundation.org"]The Linux Foundation[/URL] (TLF) who're offering free [URL="http://training.linuxfoundation.org/lp/sign-up-for-the-free-linux-training-webinar-series"]Linux training[/URL]. TLF is doing its part for the worldwide Linux community by offering this free training plus the [URL="http://jobs.linux.com"]Linux Jobs Board[/URL] and all of its [URL="http://www.linuxfoundation.org/programs"]other services[/URL]. … |
|
Hi am having problems creating a switch statement, in need to creatw the following statements N Neuromancer C Count Zero M Mona Lisa Overdrive B Burning Chrome V Virtual Light Choose a novel from menu above: c You chose "Count Zero" This is a main/driver class. Use a switch statement … |
The End.