Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
//Lisa Scherer
//7 Sep 2017
//Homework #2
//1. Write a program that prints out this sentence "My Name is:" */
//include standard IO
#include <stdio.h>
//int main ()
int main()
{
//to display "my name is"
//printf "my name is:"
printf("My name is:\n");
return 0;
}
#include <stdio.h>
int main()
{
int numero=0, resto=0;
printf("Digite um numero inteiro: ");
scanf("%d", &numero);
resto=numero%2;
if(resto==0)
printf("\nSeu numero é par\n");
if(resto==1)
printf("\nSeu numero é impar\n");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
float val1=0,val2=0,val3=0;
int error=0;
printf("Enter two numbers separated by a ',':\n");
fflush(stdin);
error=scanf("%f,%f",&val1,&val2);
val3=val1*val2;
printf("%f X %f = %f\n",val1,val2,val3);
printf("Error code: %d\n",error);
}