This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int a,b,c,d; | |
| scanf("%d%d%d%d", &a, &b, &c, &d); | |
| printf("DIFERENCA = %d\n", (a*b - c*d) ); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int num, hr; | |
| float amount; | |
| scanf("%d%d%f", &num, &hr, &amount); | |
| printf("NUMBER = %d\n", num); | |
| printf("SALARY = U$ %.2f\n", hr*amount); | |
| return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main() | |
| { | |
| char employee; | |
| double salary, sold, total_sallary; | |
| scanf("%s %lf %lf", &employee, &salary, &sold); | |
| total_sallary = salary + (sold * 15) / 100; | |
| printf("TOTAL = R$ %.2f\n", total_sallary); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int c1, c2, x1, x2; | |
| float p1, p2; | |
| scanf("%d%d%f", &c1, &x1, &p1); | |
| scanf("%d%d%f", &c2, &x2, &p2); | |
| printf("VALOR A PAGAR: R$ %.2f\n", (x1*p1) + (x2*p2) ); | |
| return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define PI 3.14159 | |
| int main() { | |
| float r; | |
| scanf("%f", &r); | |
| printf("VOLUME = %.3f\n", (4/3.0)*PI*r*r*r); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define PI 3.14159 | |
| int main() | |
| { | |
| float a, b, c; | |
| scanf("%f%f%f", &a, &b, &c); | |
| printf("TRIANGULO: %.3f\n", (a*c)*.5); | |
| printf("CIRCULO: %.3f\n", PI*c*c ); | |
| printf("TRAPEZIO: %.3f\n", ((a+b)*c)/2); | |
| printf("QUADRADO: %.3f\n", b*b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdio.h" | |
| #include "stdlib.h" | |
| int main(void) | |
| { | |
| int a,b,c; | |
| scanf("%i%i%i", &a, &b, &c); | |
| int maior = (a+b+abs(a-b))/2; | |
| int max = (maior + c + abs(maior-c))/2; | |
| printf("%d eh o maior\n", max); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $password = ""; | |
| $dbname= "crud"; | |
| //gather database credintial | |
| $servername = "127.0.0.1"; | |
| $username = "root"; | |
| //create database connection | |
| $conn = mysqli_connect($servername, $username, $password, $dbname); | |
| //Check connection | |
| if (!$conn) { |
NewerOlder