xref: /petsc/src/sys/tests/ex24.c (revision 800f99ff9e85495c69e9e5819c0be0dbd8cbc57c)
1 static char help[] = "Tests %d and %g formatting\n";
2 #include <petscsys.h>
3 
4 int main(int argc,char **argv)
5 {
6 
7   PetscFunctionBeginUser;
8   PetscCall(PetscInitialize(&argc,&argv,(char*)0,help));
9   PetscCall(PetscPrintf(PETSC_COMM_WORLD,"A string followed by integer %d\n",22));
10   PetscCall(PetscPrintf(PETSC_COMM_WORLD,"A string followed by double %5g another %g\n",23.2,11.3));
11   PetscCall(PetscPrintf(PETSC_COMM_WORLD,"and then an int %d\n",30));
12 
13   PetscCall(PetscFinalize());
14   return 0;
15 }
16 
17 /*TEST
18 
19    test:
20      diff_args: -j
21 
22 TEST*/
23