Questions tagged [letters-and-numbers]

Characters (e.g., ASCII, Unicode) that represent letters and numbers; also: converting between letters and numbers (i.e., integers)

Letters And Numbers

Letters referred to by this tag are characters (e.g., ASCII, Unicode) that represent a symbol from some language's alphabet, e.g., Latin. Numbers can also be the characters or sequences of characters representing the digits from 0 to 9. This tag can also be used for questions about converting between letters and numbers (i.e., integers in code).

36 questions
3
votes
3 answers

I am having issues with my simple calculator program breaking in C# when I enter a letter rather than a variable

For example when my program asks for a number and I enter a letter the program exits. So how can I make it do nothing when a letter Is entered? i have seen this with 'int' or 'strings' but not with 'doubles' it is really stumping me and i don't…
2
votes
3 answers

Letters to numbers in data frame in R

I have found the below code. It is working nicely but a bit more error prone when you have the full alphabet involved. ID = c(1,2,3) POS1 = c('AG','GC','TT') POS2 = c('GT','CC','TC') POS3 = c('GG','CT','AT') DF =…
Kalenji
  • 401
  • 2
  • 19
  • 42
2
votes
2 answers

Compare two cells in excel and return the matching number of Characters

I'm looking for an Excel function, which compares two cells and returns the number of matching characters between those two cells. I want the function to ignore case, i.e. A = a, B = b, etc. Example: A1 = abcdef and B1 = Afcblm.. C1 = 4 (number of…
Z Munawar
  • 21
  • 1
  • 3
2
votes
2 answers

subtracting letters in c

I would like to know how to "subtract letters" in C: I mean, I have 2 letters, 'a' and 'c' and i want to execute 'c'-'a'='b' which is 3-1=2. How is it possible to obtain the same behaviour in C? I can conversion Letters->Numbers but how to manage…
JJJ
  • 43
  • 1
  • 1
  • 3
1
vote
1 answer

Error in replacing alphabets with the next one using ascii_letters

The problem is a known one: Given a sentence, return the sentence with all its letters transposed by 1 in the alphabet, but only if the letter is a-y. I understand similar questions have been asked here bunch of times, but the solution I applied in…
1
vote
1 answer

PHP string characterization

I need to specify whether the type of string starts with either 3 digits, 3 letters, or a combination. The string the user types. The code i have works for letters and numbers, but not for the combinations. What should I do? $type = substr($value,…
1
vote
2 answers

Converting struct numbers into letters in C?

I want to read 15 numbers then convert them into letters, something like: 1 = A, 2 = B, 3 = C, 4 = D... I have this structure here: struct Num { int number; char letter; }; struct Num num[150]; and this to read the numbers: void…
nightk
  • 105
  • 12
1
vote
2 answers

Return number-interval to letters in Matlab

Is it posible to set up a function in matlab that returns an interval of numbers into a specified letter, i can only make 1=A, 2=B and so on... I want a function that can make numbers between 0-10.5=B, 9.5-20.5=X, all the way up till 300 with a new…
Mikkel Astrup
  • 405
  • 6
  • 18
1
vote
1 answer

How to find how many numbers and letters are on a string

I'm validating passwords. I need to check how many letters and numbers there are in a password. If there were less than 2 numbers or less than 2 letters, the user should be warned about an invalid password.
Josh C
  • 57
  • 1
  • 1
  • 6
1
vote
2 answers

Convert a long number to corresponding letter combinations

Given a number, translate it to all possible combinations of corresponding letters. For example, if given the number 1234, it should spit out abcd, lcd, and awd because the combinations of numbers corresponding to letters could be 1 2 3 4, 12 3 4,…
1
vote
3 answers

Java - Help converting letter to integer, adding 5, then converting back to letter

First off, here is my code so far public int encrypt() { /* This method will apply a simple encrypted algorithm to the text. * Replace each character with the character that is five steps away from * it in the alphabet. For instance, 'A'…
1
vote
2 answers

Algorithm to Generate number letter combinations with a twist

I have to generate a list of all possible combinations of numbers and letters of length three. The catch is on the first two characters can be letters or numbers, and the third one can only be numeric. For example: AA1, AA2, AA3 .... FC7 ... 001,…
OniJoshin
  • 325
  • 1
  • 4
  • 20
1
vote
2 answers

iPHP Generate 2 letters based on number

I am trying to generate some SKU numbers and I came to an issue that has made me think, and as I slept less than 2 hours I decided to ask you guys, Stackoverflowers. Let's say I've got an array of the alphabet excluding commonly mistaken…
Dimitar Mitov
  • 37
  • 2
  • 7
1
vote
1 answer

Delphi CustomSort with Numbers and Letters

Delphi used: 2007 Hello, I have a Listview with several columns. I want to sort one specific column. Items can be numbers or letters. Basically, the order should be the following: 1->99, A->Z, AA->ZZ, AAA->ZZZ. I found some CustomSort code on the…
Pascal Bergeron
  • 761
  • 3
  • 12
  • 27
1
vote
1 answer

Separate Numbers and Letters

Let's say I have a String that says "Hello123", how can I separate them to become s[0] = "Hello", s[1] = "123"? I wish to use s.split() but I don't know what to put in the argument/parameter.
e-zard Yusof
  • 25
  • 1
  • 4
1
2 3