将小写字母转换为大写字母的公式通常依赖于编程语言中的内置函数。以下是一些常见编程语言中实现这一转换的示例:
Python
```python
def to_uppercase(text):
return text.upper()
lowercase_text = "hello world"
uppercase_text = to_uppercase(lowercase_text)
print(uppercase_text) 输出: HELLO WORLD
```
JavaScript
```javascript
let lowercaseText = "hello world";
let uppercaseText = lowercaseText.toUpperCase();
console.log(uppercaseText); // 输出: HELLO WORLD
```
Java
```java
public class Main {
public static void main(String[] args) {
String lowercaseText = "hello world";
String uppercaseText = lowercaseText.toUpperCase();
System.out.println(uppercaseText); // 输出: HELLO WORLD