hi guys im a newbie on html java script,, im using switch statement but my final output always fall at my default statement need help.... here's my code... function finalgrade() { var texttgp, texttgm, texttgsf, texttgf, textfg; texttgp = parseFloat(document.frmMacky.textTgp.value); texttgm = parseFloat(document.frmMacky.textTgm.value); texttgsf = parseFloat(document.frmMacky.textTgsf.value); texttgf = parseFloat(document.frmMacky.textTgf.value); textfg = (texttgp*.20)+(texttgm*.20)+(texttgsf*.20)+(texttgf*.40); document.frmMacky.textFg.value = textfg.toFixed(2); switch(textfg) { case(textfg >=95): document.frmMacky.textEqvlnt.value="1.0"; break; case(textfg ==94): document.frmMacky.textEqvlnt.value="1.1"; break; case(textfg ==93): document.frmMacky.textEqvlnt.value="1.2"; break; case(textfg ==92): document.frmMacky.textEqvlnt.value="1.3"; break; case(textfg ==91): document.frmMacky.textEqvlnt.value="1.4"; break; case(textfg ==90): document.frmMacky.textEqvlnt.value="1.5"; break; case(textfg ==89): document.frmMacky.textEqvlnt.value="1.6"; break; case(textfg ==87): document.frmMacky.textEqvlnt.value="1.8"; break; case(textfg ==86): document.frmMacky.textEqvlnt.value="1.9"; break; case(textfg ==85): document.frmMacky.textEqvlnt.value="2.0"; break; case(textfg >=82 && …

Member Avatar
Member Avatar
+0 forum 4

Program runs without errors, unfortunately it will not calculate the days overdue. Any Suggestions? I have attached the code as a pdf, i have also done this as an IF, THEN, ELSE statement with the exact same results, but it will not let me upload it. Help! Private Sub calculateFees (ByVal intDays As Integer, ByRef decTotalDue As Decimal) If intDays <= 3 Then decTotalDue = dec Fee Else If intDays > 3 Then decTotalDue = CDec((intDays - 3) * 1.5 + decFee) End If

Member Avatar
Member Avatar
+0 forum 11

Hi all, i encounter an syntax error "Syntax Error in Insert Into" when i try to run this code... anyone can assist? Thanks! Dim sConnectionString As String sConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=H:\Users\Desktop\EmployeeAway2.xlsx;Extended Properties=""Excel 12.0;HDR=YES;""" Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString) objConn.Open() Dim objCmd As New System.Data.OleDb.OleDbCommand() objCmd.Connection = objConn objCmd.CommandText = "Insert into [Sheet1$] (EmployeeID, DateFiled, Name, Department, Reason, From, To, NumberofDays, LeaveApplied, ApprovedBy)" & _ " Values ('John', 'John', 'John', 'John', 'John', 'John', 'John', 'John', 'John', 'Thomas')" objCmd.ExecuteNonQuery() objConn.Close()

Member Avatar
Member Avatar
+0 forum 2

That program output (the chr is not a vowel ) everytime !! even if it's vowel #include <stdio.h> #include <conio.h> int main() { char ch; printf("Input a character\n"); scanf_s("%c", &ch); switch (ch) { case 'a': case 'A': case 'e': case 'E': case 'i': case 'I': case 'o': case 'O': case 'u': case 'U': printf("%c is a vowel.\n", ch); break; default: printf("%c is not a vowel.\n", ch); } _getch(); return 0; }

Member Avatar
Member Avatar
+0 forum 5

Can someone explain this what it is doing? if ( condition1 && condition2 && condition3 && condition4 && condition5 ) { code } It doesn't do what I want it to do but this does. if ( condition1 ) { if ( condition2 ) { if ( condition3 ) { if ( condition4 ) { if ( condition5 ) { code } } } } }

Member Avatar
Member Avatar
+0 forum 3

I am checking a couple of textboxes in my datarows. If the first textbox (event association 1) is not blank and it does not contain the word business, but the date of birth mtb is empty, then the statement is true and a messagebox will be displayed. Right now, I just don't understand the error, while debugging, regarding string conversion to boolean is not valid? For Each Personrow As DataRow In PFC_Xpress.Tables("Person").Rows If EVENT_ASSOC1.Text <> "" & EVENT_ASSOC1.Text <> "Business" Then For Each Personrow1 As DataRow In PFC_Xpress.Tables("Person").Rows DOB.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals If DOB.Text = "" Then Not_Business = True & …

Member Avatar
Member Avatar
+0 forum 8

Hi, What is the main aim of the callable statement? How it is differ from prepared statement?

Member Avatar
Member Avatar
+0 forum 1

You have been hired by an amusement park company to write a JAVA program that prompts a person to enter their age and height and to find out if they are eligible to ride. A person is eligible to ride if their age is above 9 years and their height is greater than 120 cm, i.e., both conditions must be satisfied for a person to ride?

Member Avatar
Member Avatar
+0 forum 4

Critically analyze the following statement "Multiple inheritance can be achieved without interface"?

Member Avatar
Member Avatar
+0 forum 5

![57584e18da6337a653024b88f1c61707](/attachments/large/4/57584e18da6337a653024b88f1c61707.JPG "57584e18da6337a653024b88f1c61707") May I know that what is the ACL as shown above doing? Why do we need deny any when we are permitting the specific ip address? Isn't that ACL list has a hidden "deny all" statement? Thank you.

Member Avatar
+0 forum 0

public class SongIterator<T,L> implements Iterator<Song<T, L>> {}

Member Avatar
Member Avatar
+0 forum 4

Hi all, Hi i have got a problem with the system i am creating on VB using Microsft Access. I have this error that keeps coming up when I debug my system. I am trying to add data in the database. I cant seem to find the solution to this error. **An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll **Additional information: Syntax error in INSERT INTO statement.**** If anyone can see what is wrong and please let me know. Thank you. Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click Dim cmd As New OleDb.OleDbCommand If Not cnn.State …

Member Avatar
Member Avatar
+0 forum 15

see first elif statement for syntax error, where have i gone wrong?? this is only a section of code, help very much appreciated. if dice == dice2 : print ("The scores on both dice remain constant, no changes are made.") elif dice > dice2 : print ("The scores of the two dice thrown are not the same.") print (a, "'s new strength is", difference, "+", c "and the new skill value is", difference2, "+", cc) elif dice < dice2 : print ("The scores of the two dice thrown are not the same.") print (b, "'s new strength is", difference, "-", …

Member Avatar
Member Avatar
+0 forum 3

here is *part* of my code: newvalue1 = difference + c newvalue2 = difference + d newvalue3 = difference2 + cc newvalue4 = difference2 + dd if dice == dice2 print ("The scores on both dice remain constant, no changes are made.") elif dice > dice2 print("The scores of the two dice thrown are not the same. Here is the new strength value for", a, newvalue1, "and the skill value for", a, newvalue2) print("Here is the strength and skill values for", b, ". The strength value is", newvalue3, "and the skill value is", newvalue4) elif dice > dice2 print("The scores …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have been working on some code in Tkinter - this is my first ever coding in python and have basically copied chunks of code over to see what is possible but I am stuck on one section - I am trying to create a GUI in Tkinter but I am having a problem with this section: def check_button(): if (GPIO.input(13) == GPIO.LOW): labelText.set("FRONT LIGHTS ON ") else: labelText.set("FRONT LIGHTS OFF") root.after(10,check_button) Basically I want to use this section of code more than once but I can't work out how to make it work, the original section of code …

Member Avatar
Member Avatar
+0 forum 1

I was going to check if a temp table exists and delete the it,since "the temptable already exists" arises if you want to perform another operation. Here's the code i used five statements but it says syntax error in drop table or drop index statement. Any help would be appreciated. "DROP TABLE IF EXISTS LIKE 'prtempTable%'" "DROP TABLE IF EXISTS LIKE '%prtempTable%'" "DROP TABLE IF EXISTS WHERE TABLE LIKE 'prtempTable%'" "DROP TABLE LIKE 'prtempTable%'" "DROP TABLE LIKE '%prtempTable%'"

Member Avatar
Member Avatar
+0 forum 6

So I'm teaching myself Java. I'm creating a text based game. I have an if statement that i want to check users input so its like this: if(sc.next() = "help"){ System.out.println("info"); } else if(sc.next() = "item"){ System.out.println("info"); } Etc. But it wont work. What would be the proper way to do this? Do i need to capture the users input into a variable first then compare?

Member Avatar
Member Avatar
+0 forum 2

Hello, I'm trying to calculate the maximum and minimum distance between 10 points. My method to calculate the maximum distance is working fine however my method to calculate the minimum is returning 0.0 and I'm not sure why. Could someone please take a look at my code and tell me what I have missed? The only difference between my max and min methods is the greater than and less than within the if statement. public static double min(double[] x, double[] y, double[] z) { double distance[] = new double[45]; double minDistance = 0; int count = 0; for (int i …

Member Avatar
Member Avatar
+0 forum 5

my problem is how to use if else statement with the use of character type string (char str[40]) for exemple char str[30]; cin>>str; or gets(str) or getline(str,30) if(str=="hello") cout<<"world"; i search this everywhere but every answer could not satisfied me.

Member Avatar
Member Avatar
+0 forum 4

Hello, Below is a simple gun simulator for the console, but everytime I hit spacebar, I have to hit it twice before the next line will pop up in the console. This started happening after I inserted the last 'if' statement in order to reload the gun. Does anyone know what's going on? Can't seem to figure it out. Thanks for any help! static void Main(string[] args) { Console.WriteLine("Press Spacebar to fire the gun. You start with 8 bullets in the mag.\n"); int i = 8; while (Console.ReadKey(true).Key == ConsoleKey.Spacebar) { if (i > 0) { i = i - …

Member Avatar
Member Avatar
+0 forum 11

I am having trouble finding out if I did the header correctly #include <iostream> #ifndef TREE #define TREE // Node class class Node { int key; Node* left; Node* right; public: Node() { key=-1; left = NULL; right = NULL; }; void setKey(int aKey) { key = aKey; }; void setLeft(Node* aLeft) { left = aLeft; }; void setRight(Node* aRight) { right = aRight; }; int Key() { return key; }; Node* Left() { return left; }; Node* Right() { return right; }; }; // Tree class class Tree { Node* root; public: Tree(); ~Tree(); Node* Root() { return root; …

Member Avatar
Member Avatar
+0 forum 2

I've asked this before and I'm really racking my brains here. To create an admin controller or simply have an if statement in the view. **view** if session == admin show admin delete post This would minimize my code so much. I really can't see the wrongness in this. Although it may contravene true MVC patterns.

Member Avatar
Member Avatar
+0 forum 1

Hi everyone I'm studying the part about while-statement but I don't understand the explanation in the book really well and the example doesn't work for me so I can't see it with my own eyes how it works. Can someone explain what the while-statement means and does? Also can you give an example that might work?

Member Avatar
Member Avatar
+0 forum 9

The End.