Re: decimal & fraction Programming Software Development by server_crash Decimal form: use DecimalFormat Fraction Form: use modulus division and a little math. Re: decimal to binary, palindrome! Programming Software Development by jeniferandrews decimal to binary conversion:=> [code] int no,d; int ctr=… Decimal To Triskaidecimal and Triskaidecimal to Decimal Programming Software Development by Varunkrishna …else if (triskaidecimal==11) { System.out.println("The Decimal To TriskaiDecimal is : B"); } else if (triskaidecimal …C"); } else { System.out.println("The Decimal To Triskaidecimal is :"+triskaidecimal); } break; case … Decimal to Fraction Calculator Programming Software Development by Rickay …static short multiplycounter; static short dividecounter; double decimal; int rdecimal; cin >> decimal; rdecimal = int(decimal); cout << setprecision(10) &… == 0) { break; } multiplycounter = 0; decimal = decimal * 10; }//loop }//if statement cout << decimal; cin.clear(); cin.ignore(255, '\n'); cin… Decimal to Binary, BCD, and Hexadecimal Programming Software Development by stamatt45 …: int MAX_SIZE; void Convert (); string decToBinary (int decimal); string decToHex (int decimal); string decToBCD (int decimal); char hex(int num); string BCD(char…;h[r[i]]; } return hex; } string ConvertDecimal::decToBCD(int decimal) { int i = decimal; string s, temp, final; stringstream out; out <<… Re: Decimal to Binary, BCD, and Hexadecimal Programming Software Development by stamatt45 …string decToBinary (int decimal); string decToHex (int decimal); string decToBCD (int decimal); char hex(int…hex; } string ConvertDecimal::decToBCD(int decimal) { int i = decimal; string s, temp, final; …MattGildner_Program0_CIS310" ); outFile << " Decimal Hexadecimal Binary BCD " << endl… Re: Decimal To Triskaidecimal and Triskaidecimal to Decimal Programming Software Development by Varunkrishna @JamesCherrill I'd tested it, it only works for numbers, say for example if I want to convert a decimal to triskaideciman(base13) it works good for only numbers, say for example I want to convert 13A to decimal it is giving me an error message Re: Decimal To Triskaidecimal and Triskaidecimal to Decimal Programming Software Development by Varunkrishna @JamesCherrill How to define a logic for converting a decimal number into triskaidecimal ? I've been looking in google but can't find it . Re: Decimal to Fraction Calculator Programming Software Development by Rickay … what you are saying. That would make the amount of decimal places the program could work with a little bit larger… this work: [CODE]static double decimal, pdecimal; cin >> decimal; int ndecimal; ndecimal = double(floor(decimal)); pdecimal == decimal - double(ndecimal); cout <<… Decimal system to Binary, Octal and Hexadecimal system Conversion.. Programming Software Development by campuzcrazyness …;------------------------------------------------------------------------"); binary = 2; gotoxy(28,9);printf("enter decimal number: "); scanf("%d",&deci); quotient …quot;); octal = 8; gotoxy(28,9);printf("enter decimal number: "); scanf("%d",&deci); for … Re: Decimal system to Binary, Octal and Hexadecimal system Conversion.. Programming Software Development by Adak …quot;); octal = 8; gotoxy(28,9);printf("enter decimal number: "); scanf("%d",&deci); for …quot;); hexa = 16; gotoxy(28,9);printf("enter decimal number: "); scanf("%d",&deci); for … Re: Decimal system to Binary, Octal and Hexadecimal system Conversion.. Programming Software Development by campuzcrazyness …quot;); octal = 8; gotoxy(28,9);printf("enter decimal number: "); scanf("%d",&deci); for …quot;); hexa = 16; gotoxy(28,9);printf("enter decimal number: "); scanf("%d",&deci); for … Re: Decimal to Fraction Calculator Programming Software Development by Clinton Portis … your above example of 12.745, you could extract the decimal portion, and put it over its place value. In this… Decimal to Binary Conversion Logic. Help! Programming Software Development by sadzee This is the Logic for converting a Decimal number to Binary. I'm having confusion in…someone make me understand this. for ( long decimal = d ; decimal > 0 ; decimal/=2 ) { binary = decimal%2 + binary ; } If d=4 …go: 4/2=2 and 4%2=0 So, binary = decimal%2 + binary => binary = 0 + (what will … decimal to binary conversion Programming Software Development by rithish …quot;; cout<<"\n press 3 for Decimal to Hexadecimal converstion"; cout<<"\n\…switch(d) { case 1: cout<<"\nEnter decimal number: "; cin>>n; while (n>…j]; } break; case 3: cout<<"\nEnter decimal number: "; cin>>n; while (n&… Re: decimal to binary conversion Programming Software Development by phorce …quot;; cout<<"\n press 3 for Decimal to Hexadecimal converstion"; cout<<"\n\…switch(d) { case 1: cout<<"\nEnter decimal number: "; cin>>n; while (n>…j]; } break; case 3: cout<<"\nEnter decimal number: "; cin>>n; while (n&… Re: Decimal data type problem Programming Databases by elbiggame … that I restored from previous version of mysql database. Decimal data appears to be correct. I'm using VB6 programs….e. I read a few posts where problems with decimal rounding occurred). My current plan is to do more research… and then modify about 100 table definitions - changing decimal fields to float fields. Thanks for the input, Big Decimal data type problem Programming Databases by elbiggame … thread on Mar 14th, 2009 : MYSQL field is Datatype DECIMAL(9,2) When I update the table and set the… having the same issue with mysql 5.0 database table decimal fields. I restored tables from a prior version. Backups … problem) are executing the same except decimal digits are moving to the left of decimal place. These programs are written in… Decimal format in java Programming Software Development by mags11 I am trying to get the program's decimal to output in two decimal places after the decimal. Please advise. [CODE] // MilesPerGallon.java // ….JOptionPane; // Needed for JOptionPane. import java.text.DecimalFormat; // Keeping proper decimal format. public class MilesPerGallon { public static void main(String args… Decimal to Binary using strings Programming Software Development by ahmed.alsalihi.3 …== 'B') { printf("enter binary number to convert to decimal: "); scanf("%s", string); for(s = strlen… + pow(2, strlen(string) - (s +1)); } } printf("the decimal number is: %d\n", sum); } if (a == 'D') {… Re: Decimal format in java Programming Software Development by xcrypted1 … am trying to get the program's decimal to output in two decimal places after the decimal. Please advise. [/QUOTE] You created dec… Re: Decimal to Binary Conversion Logic. Help! Programming Software Development by NormR1 …. The only way to see a "binary" or decimal representation for an int value is to format it into… Decimal seperator - thousand seperator when using sql server Programming Databases by serkan sendur …quot;." as thousand seperator and "," as decimal seperator. If you are working with currencies in sqlserver, and…accepts "," as thousand and "." as decimal seperator. So there are two solutions to this problem; …either you wont use money type and use decimal type instead in sql server or replace your "… Re: Decimal to Roman Numeral Programming Software Development by jlm699 … int2roman(input("Enter a number (1 to 4999) in decimal form: ")) Enter a number (1 to 4999) in… decimal form: 1942 MCMXLII >>> print int2roman(input("…Enter a number (1 to 4999) in decimal form: ")) Enter a number (1 to 4999) in… Re: Decimal Points Programming Software Development by mrnutty >>Is it possible to have them all round out to only two decimal places? First you have to decide if : 1) You want to output up to 2 decimal 2) You want the actual value of the decimal to be 2 decimal places long. decimal value in textbox Programming Software Development by procomp65 … 6. That I need to interpret as decimal 006 (hex 0x06) and not as decimal 036 (hex 0x36) which is the value… inputs 234 it must be stored in a variable as Decimal 234 Decimal Precision Programming Software Development by aznlitomik3 Hi, I forgot how to do the decimal precision aka magic formula Like after you run the program …it give you 4 decimal places but i only want 2 decimal places Hope someone can help!! Thank You… Re: Decimal Parse and CultureInfo for Decimal separator Programming Software Development by ddanbe Mine is nl-BE also with comma as decimal point. The MessageBox gives 123,45 (with comma) if I execute the OPs code. Perhaps try something like this? [CODE=c#] Decimal d = Decimal.Parse(tmp, myInfo); //123.45 string str = d.ToString(CultureInfo.GetCultureInfo("es-ES").NumberFormat);//123,45[/CODE] Decimal To Hexadecimal in Python for large numbers Programming Software Development by peterparker … for larger numbers. Here is my code: ######################################### # Decimal to Hexadecimal Conversion # ######################################### def DectoHex(n): if n… True: if Str == 'Y': print "Enter a decimal number:" dec = int (raw_input("> "))… Decimal formatting Programming Software Development by Atomicquasar …correctly and the output still doesn't align the decimal points. Can anyone help? It would be greatly …following # floating-point numbers in a column # with their decimal points aligned. num1 = 127.899 num2 = 3456.148 num3… number in a field of 7 spaces # with 2 decimal places. print(format(num1, '7.2f')) print(format(…