The Dink Network

Reply to Help With Programming

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
September 2nd 2016, 04:22 AM
milder.gif
duckhater
Peasant He/Him India
From The Depths Of Tartarus Itself 
I just started to learn C and I've reached a few hurdles(and apparently my teacher doesn't know what to do either). I was wondering if you guys could help.
1. When I use the modulus operator for floating point variables, it gives me a message that says "Illegal Use Of Float" or gives me a wrong result(when I use both int and float for the operation).
2. I couldn't for the life of me figure out how to add two char and display their sum as the sum of their ASCII values. What I typed is probably wrong but it will give an idea about what I tried to do:

char a, b;
int c;
printf ("Enter Characters");
scanf ("% c% c", &a,&b);
c = a + b;
printf("%d", c);


The output should be something like:
Enter Two Characters:
The Sum Of their ASCII Values Is:


Thanks in advance