- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
5 Posted Topics
can we pass condition of if statement as an argument in any language????????? [CODE]class Matrix { static void loop(char a,char b,char c) { int a[][]=new int[3][3] ; byte i,j ; for(i=0;i<3;i++) { for(j=0;j<3;j++) { if(a b c) System.out.print(a[i][j]+"\t"); else System.out.print(" "+"\t"); } } public static void main(String ar[]) { loop('i','>','j'); … | |
Re: try by declaring tries as static variable. | |
Re: void getMove(int arr[],int sr,int sc,int dr,int dc); void getMove(int arr[],int sr,int sc,int dr,int dc){ arr[0]=sr-65;//get ascii of rows arr[1]=sc-1;//get index started from 0 arr[2]=dr-65; arr[3]=dc-1; } how can u subtract int value(65) from char value ???? no na.... so make this changes in ur progam ur getmove function will hold … | |
Re: [CODE]#include<iostream> #include <cstdlib> //to use rand function #include <ctime> // to use time as the seed for rand using namespace std; int main(){ int number,usernumber; char repeat,userpick; int userscore,compscore,value; value=0; userscore=0; compscore=0; do{ srand(time(0)); number = 1 + (rand() % 3) ; userscore=userscore+value; compscore=compscore+value; cout<<"\nYour Score: "<<userscore<<endl; cout<<"Computers Score: "<<compscore<<endl; … | |
if i hav to input time of clock as formatted style(HH:MM:SEC) using cin how can i write its code???? a question from @robert lafore(sams publication) . hope to get a best answer soon :) |
The End.