• API
• FAQ
• Tools
• Archive
daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. 1
2.
3. scanf("%d %d %d", &a,&b,&c);
4. printf("%f",((a+b+c)/3));
5.
6. 2
7.
8. scanf("%d", &a);
9.
10. if((a>0) && ((a%2)==0)){
11.     printf("par positivo");
12. }elseif((a<0) && ((a%2)==0)) {
13.     printf("par negativo");
14. }elseif((a>0) && ((a%2)==1)) {
15.     printf("impar positivo");
16. }elseif((a<0) && ((a%2)==1)) {
17.     printf("par negativo");
18. }else{
19.     printf("nulo");
20. }
21.
22. 3
23. a = 1;
24. c=0;
25. while(a>0){
26.
27.     scanf("%d",&a);
28.     if(a>0){
29.         b+=a;
30.         c++;
31.     }
32. }
33. printf("%f",(b/c));
34.
35. 4
36.
37. scanf("%f",&a));
38. b=0;
39. while(b<a){
40.     c   +=  b;
41.     b   +=  2;
42. }
43. printf("%d",c);
44.
45. 5
46.
47. for(int b =0;b<10;b++){
48.     scanf("%f",&a));
49.     if ((a>10)&&(a<20)) c++;
50. }
51.
52. printf("%d",c);
53.
54. 6
55.
56. scanf("%f",&a));
57. scanf("%f",&b));
58. switch (a){
59. case 3: printf("%f",(b*b*(1.73/4))); break
60. case 4: printf("%f",(b*b)); break
61. case 6: printf("%f",(6*b*b*(1.73/4))); break
62. default: printf("nao sei calcular");
63. }
64.
65. 7
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top