Accenture
Company
Programming
Program
integer a = 984, b, c, d =10 print remainder(a,d) // remainder when a is divided by d a = a/d print remainder(a,d) // remainder when a is divided by d
Read Solution (Total 10)
-
printf("%d",a%d);
- 10 years agoHelpfull: Yes(23) No(4)
- here for first statement : print remainder(a,d)
we read it as (a%d) =984%10=4
so ans for first statement is 4
for the second statement : (a/d)=984/10=98.4
so a=98.4, but a is considered as integer so it is taken as 98
so now a=98
for third statement : print remainder (a,d)
we take it as (a%d)=98%10=8 //i.e result from second statement a=98
so ans for third statement is 8
so we get 4 and 8 - 10 years agoHelpfull: Yes(22) No(0)
- class rem
{
public static void main(String args[])
{
int a,b,c,d,rem;
a=984;
d=10;
rem= a/d;
System.out.println("rem= " +rem);
}
} - 10 years agoHelpfull: Yes(4) No(4)
- #include
#include
#include
void main()
{
int a=984,b=10,c=10,d=10;
float e;
e=rem(float a/float d);
printf("%d",e);
getch();
}
- 10 years agoHelpfull: Yes(3) No(1)
- Can you write this question properly?
- 10 years agoHelpfull: Yes(2) No(1)
- logic rem=num%10;
- 10 years agoHelpfull: Yes(0) No(0)
- a=a%d;
printf("Remainder:-%.3", a); - 8 years agoHelpfull: Yes(0) No(0)
- #include
using namespace std;
int main()
{ int a = 984, b, c, d =10;
int rem;
cout - 5 years agoHelpfull: Yes(0) No(0)
- the output of this code is :- 98
- 5 years agoHelpfull: Yes(0) No(0)
- #include
int main()
{ int a,d,c;
a=984;
d=10;
c=a%d;
printf("%d",c);
} - 2 years agoHelpfull: Yes(0) No(0)
Accenture Other Question