Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
/**Bismillahir Rahmanir Rahim.**/
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d:%d", &a, &b)!=EOF)
{
printf("Atraso maximo: ");
if(a<7 || (a==7 && b==0)) printf("0\n");
else printf("%d\n", ((a+1)-8)*60 + b);
}
return 0;
}
Sir, the portion, how it will be expressed in C++?? "scanf("%d:%d", &a, &b)!=EOF"
ReplyDeleteYou can write the same line on c++. It will work.
DeleteYeah. I have submitted it with this line. I just wanted to know if there is any syntax in c++,that's it.
Deletehow about in c#?
ReplyDelete