122 Topics

Member Avatar for
Member Avatar for chirag_mittal

Hello, I was given a question a few few days back to write a program that lets a user enter a value for an angle and quadrant in which the angle lies is printed using switch statement. I was able to make this program using if-else very easily but making …

Member Avatar for chirag_mittal
0
465
Member Avatar for arathy nair

Hi all, I have a situation where am using String conditions(say if(name.equalsIgnoreCase(Arathy)). I want to replace this if-else loop with Switch cases..What way i can do to accomplish this?

Member Avatar for ~s.o.s~
0
158
Member Avatar for rambo12

Hi I would like to know if I can use freeswitch with PHP for voice chat. I have downloaded the freeswitch software But I am not getting how to configure php with freeswitch where to use this in freeswitch can voice chat application be created using php. how freeswitch is …

Member Avatar for Ezzaral
0
479
Member Avatar for ginG3R

Hey guys, am a newbie and I searched I didn't see this question somewhere. If it exist, forgive me. I need help in redirecting url. I want to redirect users from [url]www.ammotorllc.com[/url] to [url]www.ammotorsllc.com[/url]. I want it that when people type the first, it will automatically switch them to the …

Member Avatar for JorgeM
0
926
Member Avatar for zacharysr

Im building a control panel on my website to cover a bunch of stuff for my website. It makes viewing each member and video, website etc alot easier. But im building a table for my members. And i have it layed out pretty good. but there's one issue. When you …

Member Avatar for weekendrockstar
0
300
Member Avatar for andrewpw

[CODE=c]int OperateGumBallMachine(void){ int total = 0; char input = getchar(); RefillGumBallMachine(); for(input; input != 'x'; input = getchar()){ if(gMachine.iNumBlueGumBalls + gMachine.iNumGreenGumBalls + gMachine.iNumRedGumBalls == 0){ RefillGumBallMachine(); } switch(input){ case 'n': total += NICKLE; if(total >= QUARTER){ total -= QUARTER; DeliverGumBall(); printf("Your change is %d cents\n", total); total = 0; } …

Member Avatar for Gaiety
0
3K
Member Avatar for llawlh

Here is my assignment due tonight, it is to create two boxes and first default box will show after user presses '1', and the argument '2' leads to a second box which will ask for user input of height, width, and length, then calculate the area and volume for it. …

Member Avatar for NormR1
0
454
Member Avatar for konman795

Hi all, this is a homework assignment that I'm not sure how to begin with. We are given all the code and I just need to finish a function to convert digits to words. For example, the string "1, 2, and 3." becomes "One, Two, and Three." The String "10" …

Member Avatar for konman795
0
338
Member Avatar for DevNet

Hi guys. I just having a little problem about creating a good console GUI for our homework. My program is just a simple shopping cart program where in we were asked to create a GUI that asks for the user if he is either a ADMIN user or a CLERK …

Member Avatar for rushikesh jadha
0
150
Member Avatar for dee101g

Am setting up a remote access server in an environment that includes a DellConnect 2824. This office was 'given' this device, no documentation. Problems: 1) I have downloaded the manual and read it, but have not been able to access the device to get into the management. Am planning to …

Member Avatar for dee101g
0
208
Member Avatar for matiulhaq

I am using Joomla , I developed one website in English in (En) folder then i copied all the website to a new directory with the same links and files with (Ar) Then i change the language of the website in Ar directory but the file is still the same …

0
128
Member Avatar for harde

[ICODE]* Slot Machine Program by Harde*/ #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { int x,a, b, c, token=4; srand(time(0)); cout<<"\t********************************************************\n" <<"\t* Welcome to slot machine. *\n" <<"\t* Would you like to play? (1 to play, 2 not to play) *\n" <<"\t********************************************************\n\n"; cin>>x; while(token!=0) {cout<<"You have …

Member Avatar for harde
0
332
Member Avatar for Adami

Hello All ! I'm trying to write a Robot Class who have several methods. One of its methods is move() that move the robot the direction his looking at, one step ahead. I'm getting an error on this: [CODE]switch (Direction) {[/CODE] If some one can help me find the mistake, …

Member Avatar for Adami
0
375
Member Avatar for ctoz

I have a switch function with four cases: each case executes a sequence of six css changes. How to stop it, if the viewer wants to abort, by choose another menu option? I've done a trawl, and the closest I've come to finding something which could be adapted is from …

Member Avatar for ctoz
0
143
Member Avatar for Octet

I am creating a database search and I am having a bit of issue when I want to return to my main menu. I have attempted to use loops with no success, could anyone suggest how I can do this? [code] #include <iostream> #include <fstream> #include <windows.h> #include <string> using …

Member Avatar for Octet
0
298
Member Avatar for javaNooblet

Hi All, I am currently trying to figure out to finish this project. Below is my code that I have so far. There are some blank methods that I am not sure where to even begin on how to complete them. I have a description of what the methods should …

Member Avatar for NormR1
0
2K
Member Avatar for nikita.

Hi , I want to run a shell script which is present in another user's id after switching it to that user in the same script. but it is not taking it. I m using the su command for that. [code] su - user1 -c "./${HOME}/script1.sh" [/code] it just says …

Member Avatar for nikita.
0
170
Member Avatar for infantheartlyje

Here is my code . Switch statement doesn't working in this. why? [CODE] int callprocess(FILE *File) { int Rec = 0; // record number char tcode[3]; //char buffer[30]; struct timeval b,e; long int tms,tme; do { printf("\nMenu :Init, Dummy, Add or Quit ( I, U, A or Q) : "); …

Member Avatar for infantheartlyje
0
182
Member Avatar for saravinuya

Can someone help me with my program. I have the code but there are some logical errors. The program should contain 100 numbers that have a menu, first the user should input a number then the menu will show: 1. it adds again a number, 2. it displays all the …

Member Avatar for dev90
0
240
Member Avatar for meyumi_lelouch

I am trying to make a program that will list all the National Heroes of our Country. We used the switch statement. [CODE]#include "stdafx.h" #include "iostream" #include "stdio.h" #include "conio.h" using namespace std; int main() { int choice,desc; char repeat; cout<<"\t\t\t\tPhilippine National Heroes\n\n"; cout<<"[1]Dr.Jose Rizal\n"; cout<<"[2]Andres Bonifacio\n"; cout<<"[3]General Gregorio Del …

Member Avatar for Anuradha Mandal
0
834
Member Avatar for Efficience

I have written this C code in which I'm declaring a variable inside switch body with initialializing it to 10.But when I'm running this code it is printing some garbage value. [CODE]#include <stdio.h> int main() { switch(2) { int x=10; case 1: printf("Case 1: %d\n",x); break; case 2: printf("Case 2: …

Member Avatar for Efficience
0
448
Member Avatar for mingis

Hi there, I am a complete newbie to JSP so apologies if this is a blindingly obvious question - I have researched on Google, but can't get this working. I have a simple switch statement as below: [CODE] <% for (int a=0; a<10; a++) { if ( null != countryID[a] …

Member Avatar for masijade
0
133
Member Avatar for Madawar

Why is this not working [CODE]//Character Manipulation #include <stdio.h> int main() { int x; //for loops int counter=0; //for input char character; char sentence[20]; printf("Press 1 to use getchar \n Press 2 to use gets \n Press 3 to use sscan \n "); scanf("%d",&x); switch(x) { case 1: printf("Enter something"); …

Member Avatar for plebbeh
0
1K
Member Avatar for baby_c

Dear friends, I'm developing a software for one of our assignments. But the problem is I's still learning these things.But since I have bunch of Java expert friends I have no fear to face it ;) .So friends this is the code. [CODE]package census; import java.io.*; public class Main { …

Member Avatar for baby_c
0
158
Member Avatar for Evesy

Hi, I recently got a wireless printer which is downstairs and I want to make a program that turns the printer on/off. If anyone knows how I can do this, that would be great. I may be able to do this in C# if necessary. I will post more details …

Member Avatar for debasisdas
0
207
Member Avatar for naffan

Hi all, I'm just finishing the code part of an assignment I think I have everything working as intended with the exception that After either the prime number or stamp duty methods complete (A & B options) they don't "flush" the char choice (under the getChoice method ) The vowel …

Member Avatar for JamesCherrill
0
5K
Member Avatar for reezox

i try to change this scrip into jsp but i stuck at switch statement - switch ($_GET['action'].. Please someone help me.. (T_T) [B]menu.php[/B] [ICODE]<li><a href="index.php?action=home">Home</a></a></li> <li><a href="index.php?action=aboutus">About Us</a></a></li>[/ICODE] [B]index.php[/B] [ICODE]<td width="20%" valign="top"> <?php include ('menu.php'); ?> </td> <td width="85%" valign="top"> <?php switch ($_GET['action']){ case 'aboutus': include 'aboutus.php'; break; case 'home': …

Member Avatar for reezox
0
137
Member Avatar for Robbie Y.

Hey guys! I'm trying to write a program that involves a switch/case on Microsoft Visual Studion 2010. Unfortunately, some of my variables are not being initialized. I am a very novie programmer so please have mercy on me! Two of my options (1,4) are working but options (2,3) are not. …

Member Avatar for Robbie Y.
0
169
Member Avatar for The physicist

Hi all, I'm sure it's an error by me, but I'm having a problem with ifstream inside a loop. The reason for the loop is read in a piece of text from multiple files, and cases within the switch statement change the filename, path is previously declared. The first iteration …

Member Avatar for The physicist
0
2K
Member Avatar for d_panayotov

Hi, I tried searching but I don't know how exactly to describe my question in 2-3 words so I didn't find anything. Is it possible to do something like this?Just to get the idea... I know it doesn't work: [CODE]switch(c){ case '1':{ (...) ; break;} case '2':{ (...) ; break;} …

Member Avatar for L7Sqr
0
127

The End.