Actual source code: ex24.c

  1: static char help[] = "Tests %d and %g formatting\n";
  2: #include <petscsys.h>

  4: int main(int argc,char **argv)
  5: {

  7:   PetscInitialize(&argc,&argv,(char*)0,help);
  8:   PetscPrintf(PETSC_COMM_WORLD,"A string followed by integer %d\n",22);
  9:   PetscPrintf(PETSC_COMM_WORLD,"A string followed by double %5g another %g\n",23.2,11.3);
 10:   PetscPrintf(PETSC_COMM_WORLD,"and then an int %d\n",30);

 12:   PetscFinalize();
 13:   return 0;
 14: }

 16: /*TEST

 18:    test:
 19:      diff_args: -j

 21: TEST*/