This repository has been archived on 2024-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
blogs/syntax-highlighting.html
2024-03-17 00:46:57 -05:00

5.4 KiB
Raw Permalink Blame History

<html lang="en"> <head> </head>

Syntax Highlighting

Command Line Example

    # ls -a 
    

C Example

    /* Adding Vectors
    *
    * A Program that adds vectors given the components.
    */
    #include <stdio.h>
    #include <stdlib.h>

    int main() {
	float u1, u2, v1, u1, v2; /* Components */
	
	/* Prompt user for variables */
	printf("Enter the first component of vector 𝐮 (𝑢₁): ");
	scanf("%f", &u1);
	
	printf("Enter the second component of vector 𝐮 (𝑢₂): ");
	scanf("%f", &u2);

	printf("Enter the first component of vector 𝐯 (𝑣₁): ");
	scanf("%f", &v1);

	printf("Enter the second component of vector 𝐯 (𝑣₂): ");
	scanf("%f", &v2);

	/* Print the sum of the vectors */
	printf("𝐮 + 𝐯 = <%.2f, %.2f>\n", u1 + v1, u2 + v2);

	return 0;
    }
    
</html>