Actual source code: ex24.c
petsc-3.13.6 2020-09-29
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*/