Fixed block code and syntax highlighting (#29977)
This commit fixes the example code to demonstrate the working of arithmetic operators so that the entire code, from initial comment to ending curly brace for main(), is in a Markdown code block and is syntax highlighted. Spacing around the include and int initialization was improved as well.
This commit is contained in:
committed by
Christopher McCormack
parent
f51f262104
commit
44661a3e06
@@ -50,13 +50,14 @@ Operators in C specifies the Mathematical, Conditional and Logical Operations to
|
|||||||
int c = --a; // prefix operator; a = 5, c = 5
|
int c = --a; // prefix operator; a = 5, c = 5
|
||||||
```
|
```
|
||||||
|
|
||||||
C Program to demonstrate the working of arithmetic operators
|
- C Program to demonstrate the working of arithmetic operators
|
||||||
```C
|
```C
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int a = 9,b = 4, c;
|
int a = 9, b = 4, c;
|
||||||
|
|
||||||
c = a+b;
|
c = a+b;
|
||||||
printf("a+b = %d \n",c);
|
printf("a+b = %d \n",c);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user