+ 1

Can anyone post a simple adding of two numbers c code

18th Jul 2019, 6:11 AM
Naresh
7 Respostas
+ 8
Naresh try this : int a=2; int b=3; int c; c=a+b; printf("%d",c);
18th Jul 2019, 6:17 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 8
printf("%d",1+2); Is this what u expected?
18th Jul 2019, 6:13 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 7
Naresh you r welcome, bro
18th Jul 2019, 6:19 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 3
You should attempt it yourself first.
18th Jul 2019, 9:29 AM
Sonic
Sonic - avatar
+ 1
No bro showing error in solo learn
18th Jul 2019, 6:16 AM
Naresh
+ 1
Thanks bro
18th Jul 2019, 6:18 AM
Naresh
+ 1
#include<stdio.h> main() { float a; float b; printf("Enter 2 numbers:\n"); scanf("%f%f",&a,&b); printf("Sum = %f\n",a+b); return 0; }
18th Jul 2019, 6:22 PM
@$@$!Π
@$@$!Π - avatar