-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathweek9.cpp
More file actions
55 lines (43 loc) · 817 Bytes
/
week9.cpp
File metadata and controls
55 lines (43 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include<stdio.h>
#include<conio.h>
#include<iostream>
#include<stdlib.h>
using namespace std;
//x denotes the xth task and the total time till then.
int Fi(int time[], int x){
int i=0,sum=0;
while(i<x){
sum=sum+time[i];
}
return sum;
}
//y denotes the time in which it is done, x denotes the xth task.
int Pi(int time[], int x, int y){
if(y<time[x]){
return 0;
}else{
return 10;
}
}
int optnocons(int time[], int n){
int taken[n];
m=0;
while(m<n){
cout<<"Input time taken for task "<<m<<"\n";
cin>>p;
m++;
}
cout<<"The Minimum time is: "<<min;
}
int main(){
int n,p,min=0;
cout<<"Input No. of Jobs?";
cin>>n;
int time[n],i=0;
cout<<"Input time for each Task?";
while(i<n){
cout<<"Time for Job "<<i<<"\n";
cin>>time[i];
i++;
}
}