Actual source code: ex24.c

petsc-3.10.5 2019-03-28
Report Typos and Errors
  1: static char help[] = "Tests %D and %g formatting\n";
  2:  #include <petscsys.h>


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

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

 14:   PetscFinalize();
 15:   return ierr;
 16: }



 20: /*TEST

 22:    test:

 24: TEST*/