My prof. said create a program using loop statement,nested loop while loop,do loop,for loop.can u give me some problem in visual basic in c++ using all of that?
It better u give me the harder one because the harder the highest grade.. ^^
i have example of program have been create to give u idea.But the example i have given to u has not use in any kind of loop ^^... i need it very soon..
example:
#include<iostream.h>
#include<stdlib.h>
void main()
{
int num,x,sum=0;
cout<<"Enter an interger:";
cin>>num;
for(x=1;x<num;x++)
{
if(num%x=0)
cout<<x<<"\t";
sum=sum+x;
}
}
cout<<"The sum of factors:"<<sum<<endl;
if(sum==sum)
cout<<"Then no. is DWARF"<<endl;
else
cout<<"The no. is Not DWARF"<<endl;
}
this example cant be use in loop statement,nested loop,while loop,do loop,for loop.tnx i be waiting...... ^^