Nu crezi ca poti inchide calculatorul cu un program C/C++? Sunt aici 3 variante diferite pentru 3 sisteme de operare.
Windows 7, Windows 8 sau Windows 8.1
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("C:\\WINDOWS\\System32\\shutdown /s");
return 0;
}
Windows XP
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("C:\\WINDOWS\\System32\\shutdown -s");
return 0;
}
Ubuntu Linux (trebuie sa fi utilizator "root" (?) )
#include <stdio.h>
int main()
{
system("shutdown -P now");
return 0;
}
Windows 7, Windows 8 sau Windows 8.1
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("C:\\WINDOWS\\System32\\shutdown /s");
return 0;
}
Windows XP
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("C:\\WINDOWS\\System32\\shutdown -s");
return 0;
}
Ubuntu Linux (trebuie sa fi utilizator "root" (?) )
#include <stdio.h>
int main()
{
system("shutdown -P now");
return 0;
}
Niciun comentariu:
Trimiteți un comentariu