Please help me T.T

i try to figure out what the wrong place, but i m newbie...any pro please let me know where i m wrong..ASAP thanks


#include <stdio.h>

int main ()
{
int m=+1;
int q=100*a;
printf ("Enter Two Number:");
scanf ("%d%d" ,&m,&a);
printf ("m=%d\n q=%d\n",m,q);
return 0;
}
int m=+1? i guess you wanted to make that int m+=1. ie m=m+1, which is inappropriate because, m is now being declared, and is not clean.

Aceix.
Last edited on
1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>

int main ()
{
	int m;
	int q;
	printf ("Enter Two Number:");
	scanf ("%d%d" ,&m,&q);
	printf (" m=%d\n q=%d\n",m,q);
	return 0;
}  
Last edited on
I think your code is purely C.

1
2
3
4
5
6
7
8
9
10
#include <iostream>

int main()
{
    int m, a;
    std::cout << "Enter two numbers:";
    std::cin >> m >> a;
    std::cout << m << "\n" << a << "\n";
    return 0;
}



I believe this code is faster due to compile-time polymorphism of functions (function overloading) which I believe is not present in C.
Topic archived. No new replies allowed.