Something like this?
h1 = int(input())
m1 = int(input())
s1 = int(input())
h2 = int(input())
m2 = int(input())
s2 = int(input())
s = h2*3600 + m2*60 + s2 - (h1*3600 + m1*60 + s1)
print(s)
Answer:
If something goes wrong, it doesn't affect any real-world situations or the company itself in the real world
Explanation:
Answer:
#include <iostream>
using namespace std;
struct StudentType{
string studentName;
int studentId;
}
int n;
char answer[20];
int main(){
cout<< "Enter the size of the array: ";
cin >> n;
StudentType *student = new StudentType(n);
for (int i = 0; i < n; i++){
int name;
int number;
cin>> name;
cin >> number;
student[i].studentName = name;
student[i].studentId = number;
}
for (int i = 0; i < 20; i++){
cout<< "Enter answers: ";
cin >> ans;
answer[i] = ans;
}
}
Explanation:
The C++ source code has three global variables namely, answer which is an array of character data type, StudentType which is a structure data type and the integer variable n. The main function declares and initializes the dynamic-spaced student array of the structure datatype with the n variable.