How to quick format this code in vim?

  question, vim
#include<stdio.h>
 int main(int argc, char *argv[])
 {
 int i=0;
 if (i !  = 0) {i++;  }
 else {i--;   };
 for(i=0;  i<5;  i++)j++;
 printf("i=%d,j=%d\n",i,j);
 return 0;
 }
 
 How did the code above make quick format look like this?
 
 #include
 int main(int argc ,char* argv[])
 {
 int a = 4;
 int b = 5;
 int f_a = factorial(a);
 int f_b = factorial(b);
 while(1)
 {
 if(cmp(f_a,f_b))
 {
 printf("f_a is bigger than f_b\n");
 }
 else
 {
 printf("f_a is not bigger than f_b\n");
 }
 sleep(100);
 }
 return 0;
 }
 
 Without plug-ins, can you write a simple template file to format the file?
 
 The answer of 10086 is incorrect.
 ggvG
 =
 Become
 
 #include<stdio.h>
 int main(int argc, char *argv[])
 {
 int i=0;
 if (i !  = 0) {i++;  }
 else {i--;   };
 for(i=0;  i<5;  i++)j++;
 printf("i=%d,j=%d\n",i,j);
 return 0;
 }

Step 1:ggvG///< Return to the first line first, then select the mode and select all codes.
Step 2:=///< = is generally used for equal layout, which means that under code indent. vim multiple split, the size of each split can also be adjusted equally.