Skip to content

Instantly share code, notes, and snippets.

View andersonritzmann's full-sized avatar

andersonritzmann

View GitHub Profile
@andersonritzmann
andersonritzmann / gist:eed0cd70482d18068bd997ba7999d688
Created June 27, 2018 05:03
Criar uma função que receba um caractere como parâmetro e retorne 1 (um) caso seja uma vogal e zero caso não seja.
#include <stdio.h>
#include <stdlib.h>
int alfabeto (char letra);
int main(){
char letra;
printf("Digite uma letra:");
scanf("%c",&letra);
if(alfabeto (letra)==1)
{
printf("Vogal");
@andersonritzmann
andersonritzmann / gist:5850f9876ce11b4b792f58f677781c0c
Created June 27, 2018 04:47
Criar uma função que retorna o seguinte: A função recebe 3 valores float e retornar o quadrado do 1º + a soma dos outros dois. Vai retornar o tipo inteiro.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
float function(float x,float y, float z);
int main(){
int valor_recebido;
float x,y,z;
scanf("%f %f %f",&x,&y,&z);
valor_recebido=function(x,y,z);
printf("o valor eh: %i",valor_recebido);