Advertisement
Guest User

130025291_emanuel

a guest
Mar 21st, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #include<stdlib.h>
  2. #include<stdio.h>
  3. int main(){
  4. int km,hora;
  5. int velocidade;
  6. scanf("%d %d", &km,&hora);
  7. velocidade=km/hora;
  8. printf(" a velocidade e: %d" , velocidade);
  9. }
  10.  
  11.  
  12. #include<stdio.h>
  13. #include<stdlib.h>
  14. int main(){
  15. float custofabrica,imposto,distribuidora;
  16. float valor;
  17. scanf("%f %f %f" ,&custofabrica,&imposto,&distribuidora);
  18. valor=custofabrica*(1+distribuidora+imposto);
  19. printf(" o valor final do carro é : %f ", valor);
  20. return 0;
  21. }
  22.  
  23.  
  24.  
  25. #include<stdio.h>
  26. #include<stdlib.h>
  27. int main(){
  28. int n,n1,n2,n3,n4,n5,n6,soma, dv;
  29. scanf("%d",&n);
  30. n1=n/100000;
  31. n2=n/10000-(n1*10);
  32. n3=n/1000-(n2*10+n1*100);
  33. n4=n/100-(n3*10+n2*100+n1*1000);
  34. n5=n/10-(n4*10+n3*100+n2*1000+n1*10000);
  35. n6=n-(n5*10+n4*100+n3*1000+n2*10000+n1*100000);
  36. soma=n1*7+n2*6+n3*5+n4*4+n5*3+n6*2;
  37. dv=11-(soma%11);
  38. printf("%d",dv);
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement