Narine natalya
?>

Два на линукс. 1. create empty file and check the access time using ls command with proper option. update the access time to the current time. update access time to the beginning of the day.2. create empty file testfile and directory testdir. try to remove both file and directory with one command. make sure that there will be error when directory will be removed and that removal of the file will result in text output. redirect successful deletion message to one file and error message to another file. repeat this actions but redirect both stdout and stderr channels to the same file.

Информатика

Ответы

Hugokate77729

A)

1) touch emptyfile

2) ls -g

3) cat emptyfile

4) touch -a -m -t 203710141103.24 emptyfile

B)

1) touch testFile

2) mkdir testDir

3) rm ./* 1> ./stdout.txt 2>./stderr.txt

4) rm ./* &> ./stdouterr.txt

srgymakarov
По порядку:
1) Ты забыл подключить библиотеку <iostream> (надо было наприсать
#include <iostream>)
2) int - тип целочисленных переменных - они могут принимать лишь значения, что не удивительно, целых чисел. Для твоей цели необходимо использовать строковую переменную, в C++ - это string (Для ее использования необходимо ее подключить - #include <string>)

Итого
#include <iostream>
#include <string>

using namespace std;

int main() {
string name;
cout << "What is your name?";
cin >> name;
cout << "Hello, " << name<< endl;
return 0;
}
Elen-Fler
№1
var a, b, c: integer;
begin
read(a, b, c);
if((a = b) or (b = c) or (c = a)) then
write('Треугольник равнобедренный')
else 
write('Треугольник неравнобедренный');
end.

БЛОКСХЕМА:
начало
ввод сторон(a, b, c)
если a = b или b = c или с = a, то
вывести: 'треугольник равнобедренный'
иначе вывести: 'треугольник неравнобедренный'
конец

№2
var n, s, i: integer;
begin
s := 0;
read(n);
for i := 20 to n do begin
if (i mod 2 <> 0) then s := s + i;
end;
write(s);
end.

БЛОКСХЕМА:
начало
s := 0, i := 20
ввод числа n
пока i не равно n
   если i - нечётное, то
      прибавить к s
вывести  s
конец

Сделать блок ! на языке паскаль 1.заданы стороны треугольника. проверить является ли он равнобедренн
Сделать блок ! на языке паскаль 1.заданы стороны треугольника. проверить является ли он равнобедренн

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Два на линукс. 1. create empty file and check the access time using ls command with proper option. update the access time to the current time. update access time to the beginning of the day.2. create empty file testfile and directory testdir. try to remove both file and directory with one command. make sure that there will be error when directory will be removed and that removal of the file will result in text output. redirect successful deletion message to one file and error message to another file. repeat this actions but redirect both stdout and stderr channels to the same file.
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

qadjiyevaaynura
modno-trikotazh
stairov536
Olegmgu11986
Viktorovich
mariia39
sve707ta
федороа
ovalenceva77
vova00831
borisowaew
Klicheva_Ermachenkova1536
Роман Александр66
Nadezhdachizhikova7968
a-lossev111