-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path2.c
More file actions
31 lines (30 loc) · 646 Bytes
/
Copy path2.c
File metadata and controls
31 lines (30 loc) · 646 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
#include<stdio.h>
int main()
{
int n[10][31];
for (int i=0; i<10; i++)
{
for (int j=0; j<31; j++)
{
printf("Enter temparature for day %d in city %d -> ", j+1, i+1);
scanf("%d", &n[i][j]);
}
}
int max = 0, min = 0;
for (int i=0; i<10; i++)
{
for (int j=0; j<31; j++)
{
if (n[i][j] > max)
{
max = n[i][j];
}
if (n[i][j] < min)
{
min = n[i][j];
}
}
}
printf("Max temparature is %d\n", max);
printf("Min temparature is %d\n", min);
}