Advertisement
leonard007

Untitled

Dec 13th, 2023
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1.   while(1) {
  2.  
  3.     puts("1. CPU Info");
  4.     puts("2. Memory Info");
  5.     puts("3. PCI Devices");
  6.    
  7.     printf("Option: ");
  8.     scanf("%d", &optiune);
  9.    
  10.     if(optiune == 1) {
  11.        strcpy(buff, "cpuinfo");
  12.     } else if(optiune == 2) {
  13.        strcpy(buff, "meminfo");
  14.     } else if(optiune == 3) {
  15.        strcpy(buff, "lspci");
  16.     }
  17.    
  18.     // trimitere cerere si primire raspuns
  19.  
  20.     printf("Doriti o alta optiune? (1/0)");
  21.     scanf("%d", &optiune);
  22.    
  23.     if(optiune == 0) {
  24.       break;
  25.     }
  26.  
  27.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement