!!!!
Type: Posts; User: Soul
!!!!
^ the problem is i don't have much time , i have to finsh it soon
i didn't posted here .. i know i should use a loop
after writing the loop and the cout .. how i can make the program to STOP ?
using break , continue ? (i don't know what's the difference between...
what you mean ?
= { 0 }
if i remove 0 from the carry , the output will be -858993460 without the summation
another questions:
1. how i can make the program to stop if the user entered...
ok i want the output to be in the same row , like this : 0 0 0 1 0
rather than : 0
0
0
1
0
how can i do it ?
and there...
cout<<"sum= "<<sum[i];
cout<<endl;
you mean like this ?
i don't know how to write fuction to calculate other than this way
then how ?
i change i=4
no wornings or errors
but the summation is wrong if there is carry
#include<iostream>
using namespace std;
int main()
{
int arr[5],arr1[5],sum[5],carry[6]={0};
ok how about this :
int main()
{
int arr[5],arr1[5],sum[5],carry[6]={0};
int i ,c;
cout<<"number 1.:"<<endl;
for(i=0;i<5;i++)
{
ok how can i correct it ?
yes i know
i know but i wasn't sure how to seperate them and adding them
by using % / ?
like i said i am biggnner to the programming :(
ok i changed my code to this
#include <iostream>
using namespace std;
int main ()
{
int arr[5],arr1[5],carry=0,sum[6],i;
cout<<"number 1. ";
{
cin>>arr[i];
plzz help me :(((
i have exam soon & i need to know how to do it with input :(
ok thanks i will try it
but how can make sure that the input in binary ?
what should i write
hi i am biggnner to programming
so i don't know exactly how to add binary numbers (5bit)
i tried of course
#include <iostream>
using namespace std;
int main ()
{