Skip to content

Instantly share code, notes, and snippets.

View m4hi2's full-sized avatar
❄️
Chill

Mahir Labib Chowdhury m4hi2

❄️
Chill
View GitHub Profile
#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;
}
#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;
#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;
}
#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;
#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;
}
#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);
#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);
@m4hi2
m4hi2 / gist:65c26f0ae2bb6868791e
Last active August 29, 2015 14:19
আমি চাচ্ছি, নতুন ইউজার এ্যাড করার আগে ঐ আইডিতে কোন ইউজার আছে কিনা সেটা চেক করতে
<?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) {